-
-
Notifications
You must be signed in to change notification settings - Fork 39
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 2222
and sends all data between it and example.com:22
.
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": {
"2222": {
"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:22",
}
}
}
}
The following example will start a proxy at port 21
and uses example.com:21
as target address.
{
"deploy.reloaded": {
"proxies": {
"21": "example.com:21"
}
}
}
The following example will start a proxy at port 2222
and transfers data between it and the service, which listens on port 22
on the local machine.
{
"deploy.reloaded": {
"proxies": {
"2222": 22
}
}
}
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 (s. .vscode-deploy-reloaded sub folder inside the user's home directory). 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
Defines the display text of the button.
{
"deploy.reloaded": {
"proxies": {
"22": {
"name": "My proxy",
"button": "${proxyStateIcon} Proxy '${proxy}' @ port ${proxyPort}",
// ...
}
}
}
}
Indicates if a button should be enabled or not.
{
"deploy.reloaded": {
"proxies": {
"22": {
"button": false,
// ...
}
}
}
}
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
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). |
{
"deploy.reloaded": {
"proxies": {
"2121": {
"destination": 21
}
}
}
}
{
"deploy.reloaded": {
"proxies": {
"22": {
"destination": "example.com:${proxyPort}"
}
}
}
}
The following placeholders are also supported:
Name | Description |
---|---|
proxyPort |
The TCP port the proxy listens on. |
{
"deploy.reloaded": {
"proxies": {
"2222": {
"destination": {
"address": "example.com",
"port": 22
}
}
}
}
}
The following placeholders are also supported for name
and description
, e.g.:
Name | Description |
---|---|
proxyPort |
The TCP port the proxy listens on. |