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 to endpoints.

A scenario could be, that someone owns a VPN connections and wants to share it over TCP ports.

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

Name Description
color The custom (text) color when the proxy is running.
command The custom ID for the underlying command.
enabled Enable button or not. Default: (true)
isRight Put button on the right side or not. Default: (false)
priority The priority.
(https://github.com/mkloubert/vscode-deploy-reloaded/wiki#packages-) are used.
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:5979"
            }
        }
    }
}
As object
{
    "deploy.reloaded": {
        "proxies": {
            "23979": {
                "destination": {
                    "address": "example.com",
                    "port": 5979
                }
            }
        }
    }
}
Clone this wiki locally