Advanced Options for HTTP(S) tunnels

Some advanced options to allow CORS preflight requests bypass authentication, add X-Forwarded headers, etc.

Add X-Forwarded-For header to every request

X-Forwarded-For is a mechanism to finding out the source (IP and Port) of the connection. Pinggy HTTP(S) tunnel does not implicitly add the this flag. However, user can enable X-Forwarded-For header with x:xff command line argument.

If you want to change the header name from X-Forwarded-For to something custom such as Source-Address, you can also do so using the argument: x:xff:Source-Address.

Allow CORS preflight requests

By default, enabling key authentication / password authentication will block all unauthenticated requests to Pinggy URLs. But sometimes the CORS preflight requests are required to be sent through to enable CORS. In those cases you can use the x:passpreflight argument.

Pinggy allows users to manipulate headers via the command line. The syntax is as follows:

Forcefully disconnect existing tunnel and create a new tunnel

By default, trying to connect to establish a tunnel with a token which is already in use by another active tunnel will produce the error “Login is not allowed: A tunnel with the same token (xxYYzzZ) is already active.”

In such cases, in order to terminate the tunnel, you can use the “Terminate” option in “Active Tunnels” page in https://dashboard.pinggy.io/

If you want to programatically disconnect an existing tunnel to forcefully create a new one, you may use the force option as follows.