Skip to content

APIs

The subsection converter is actually an API. And to support proxy-provider, I implemented another API.
Here I'm gonna introduce the APIs.

GET /sub

This is the API for subsection converter. It's contained in the link generated by the web ui.
It accepts GET requests. Here're the parameters:

ParameterDescriptionOptionalDefaultRemarks
urlThe URL of the original subscription or node sharing link. It needs to be URIComponent encoded.No-Multiple subscription links are supported. You can use line breaks or "
intervalThe interval of proxy update.Yes1800Unit: seconds.
urlstandbyThe URL of the standby subscription or node sharing link. The proxies in it will only be added to the manual switch group (the group whose "manual" is True in the configuration file), and will not be classified into region groups. It's recommended to be URIComponent encoded.Yes-Multiple subscription links are supported. You can use line breaks or "
shortIf this parameter is set (regardless of its value), the header section and dns section containing allow-lan will not be generated.Yes--
nprIf this parameter is set (regardless of its value), the URL of the ruleset will not be proxied.Yes-By default, this service is used to proxy the URL of the ruleset to ensure that the ruleset can be obtained normally. If this parameter is set, the URL of the ruleset will not be proxied.

GET /provider

This API converts the subscription to the configuration required by proxy-provider. This API will be called whenever the proxy is updated via proxy-provider.

It accepts GET requests. Here're the parameters:

ParameterDescriptionOptionalDefaultRemarks
urlThe URL of the original subscription. It needs to be URIComponent encoded.No-Should be a single subscription link.

GET /proxy

This API is used to access the specified URL through this service. It accepts GET requests. Here're the parameters:

ParameterDescriptionOptionalDefaultRemarks
urlThe URL to be proxied. It needs to be URIComponent encoded.No-Use this service to access this URL and return the result.

Released under the MPL-2.0 License.