Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

proxies

Marcel Kloubert edited this page Mar 13, 2018 · 20 revisions

Home >> Settings >> Proxies

[!!!IN DEVELOPMENT!!!] Proxies

Defines one or more TCP proxies, which transfer data between two endpoints.

A scenario could be, that someone owns a VPN connection and wants to share it.

The following example starts a proxy at local port 8080 and sends all data between it and example.com:80. Additionally access is stricted to IP of 192.168.0.0/24 (IPv4) and 0:0:0:0:0:FFFF:C0A8:0000/24 (IPv6).

{
    "deploy.reloaded": {
        "proxies": {
            "8080": {
                "name": "My proxy",
                "description": "This proxy listens on port ${proxyPort}",
                
                "allowed": [
                    "0:0:0:0:0:FFFF:C0A8:0000/24",
                    "192.168.0.0/24"
                ],
                
                "destination": "example.com:80",
            }
        }
    }
}

Settings

Destination address (string)

The following example will start a proxy at port 5979 and uses example.com:80 as target address.

{
    "deploy.reloaded": {
        "proxies": {
            "5979": "example.com:80"
        }
    }
}

Destination port on local machine (number)

The following example will start a proxy at port 80 and transfers data between it and the service, which listens on port 8080 on the local machine.

{
    "deploy.reloaded": {
        "proxies": {
            "80": 8080
        }
    }
}

As object

Name Description
allowed One or more allowed IPs in CIDR format. Default: All IPs are allowed.
autoStart Run proxy on startup. Default: (true)
button Settings for a button. Default: (true)
debug Enable logging or not. Default: (false)
description* A description for the proxy.
destination* The destination.
if One or more conditions (as JavaScript code) that defines if proxy is available or not, similar to values.
name* The (display) name of the proxy.
platforms One or more platform names the proxy is for. s. process.platform

* supports placeholders

Buttons

As text (string)

Defines the display text of the button.

{
    "deploy.reloaded": {
        "proxies": {
            "8080": {
                "name": "My proxy",
                "button": "${proxyStateIcon} Proxy '${proxy}' @ port ${proxyPort}",
            }
        }
    }
}
As boolean

Indicates if a button should be enabled or not.

{
    "deploy.reloaded": {
        "proxies": {
            "8080": {
                "button": false
            }
        }
    }
}
Additional values

The following placeholders are also supported:

Name Description
proxy The display name of the underlying proxy.
proxyPort The TCP port the proxy listens on.
proxyStateIcon The state icon. Can be $(triangle-right) (running) or $(primitive-square) (not running).
As object
Name Description
color The custom (text) color when the proxy is running.
enabled Enable button or not. Default: (true)
isRight Put button on the right side or not. Default: (false)
priority The priority.
stopColor The custom (text) color when the proxy is NOT running.
text* The custom display text.
tooltip* The custom tooltip text.

* supports placeholders

Destination

As port value
{
    "deploy.reloaded": {
        "proxies": {
            "80": {
                "destination": 8081
            }
        }
    }
}
Address with optional port
{
    "deploy.reloaded": {
        "proxies": {
            "23979": {
                "destination": "example.com:${proxyPort}"
            }
        }
    }
}

The following placeholders are also supported:

Name Description
proxyPort The TCP port the proxy listens on.
As object
{
    "deploy.reloaded": {
        "proxies": {
            "23979": {
                "destination": {
                    "address": "example.com",
                    "port": 5979
                }
            }
        }
    }
}

Additional values

The following placeholders are also supported for name and description, e.g.:

Name Description
proxyPort The TCP port the proxy listens on.
Clone this wiki locally