feat(proxy): socks5 support (#933)

This commit is contained in:
joslynesser
2020-11-27 11:18:23 -08:00
committed by GitHub
parent a8d9c033b6
commit 364c6c25df
4 changed files with 5 additions and 2 deletions
+1
View File
@@ -59,6 +59,7 @@ PHONE_CARRIER=""
PHONE_NUMBER=""
PLAY_SOUND=""
PROXY_ADDRESS=""
PROXY_PROTOCOL=""
PROXY_PORT=""
PUSHBULLET=""
PUSHOVER_TOKEN=""
+1
View File
@@ -98,6 +98,7 @@ environment variables are **optional**._
| `PAGE_SLEEP_MIN` | Minimum sleep time between queries of the same product page | In milliseconds, default: `5000` |
| `PAGE_SLEEP_MAX` | Maximum sleep time between queries of the same product page | In milliseconds, default: `10000` |
| `PAGE_TIMEOUT` | Navigation Timeout in milliseconds | `0` for infinite, default: `30000` |
| `PROXY_PROTOCOL` | protocol of proxy server, such as `socks5` | default: `http` |
| `PROXY_ADDRESS` | IP Address or fqdn of proxy server |
| `PROXY_PORT` | TCP Port number on which the proxy is listening for connections | Default: `80` |
| `SCREENSHOT` | Capture screenshot of page if a card is found | Default: `true` |
+2 -1
View File
@@ -291,7 +291,8 @@ const page = {
const proxy = {
address: envOrString(process.env.PROXY_ADDRESS),
port: envOrNumber(process.env.PROXY_PORT, 80)
port: envOrNumber(process.env.PROXY_PORT, 80),
protocol: envOrString(process.env.PROXY_PROTOCOL, 'http')
};
// Check for deprecated configuration values
+1 -1
View File
@@ -44,7 +44,7 @@ async function main() {
// Add the address of the proxy server if defined
if (config.proxy.address) {
args.push(
`--proxy-server=http://${config.proxy.address}:${config.proxy.port}`
`--proxy-server=${config.proxy.protocol}://${config.proxy.address}:${config.proxy.port}`
);
}