Skip to content

Reverse Proxy

Mariotaku edited this page Apr 10, 2017 · 2 revisions

Reverse proxy is a special proxy format invented by Twidere.

Warning! Your request will be fully visible to reverse proxy server, make sure your proxy provider is trusty!

Supported patterns

  • [SCHEME]: E.g. http or https
  • [HOST]: Host address
  • [PORT]: Port number
  • [AUTHORITY]: [HOST]:[PORT] or [HOST] if port is default. Colon will be URL encoded
  • [PATH]: Raw path part, without leading slash
  • [/PATH]: Raw path part, with leading slash
  • [PATH_ENCODED]: Path, will be URL encoded again
  • [QUERY]: Raw query part
  • [?QUERY]: Raw query part, with ? prefix
  • [QUERY_ENCODED]: Raw query part, will be URL encoded again
  • [FRAGMENT]: Raw fragment part
  • [#FRAGMENT]: Raw fragment part, with # prefix
  • [FRAGMENT_ENCODED]: Raw fragment part, will be URL encoded again
  • [URL_ENCODED]: URL Encoded url itself
  • [URL_BASE64]: Base64 Encoded url itself

Null values

[PATH], [/PATH], [QUERY], [?QUERY], [FRAGMENT], [#FRAGMENT] will be empty when it's null, values and base64-encoded will be string "null".

A valid format looks like

https://proxy.com/[SCHEME]/[AUTHORITY]/[PATH][?QUERY][#FRAGMENT],

A request

https://example.com:8080/path?query=value#fragment

Will be transformed to

https://proxy.com/https/example.com%3A8080/path?query=value#fragment

Authentication

Twidere will send basic Proxy-Authorization header to reverse proxy server.