mirror of
https://github.com/opelly27/streetmerchant.git
synced 2026-05-20 02:57:34 +00:00
feat(proxy): socks5 support (#933)
This commit is contained in:
@@ -59,6 +59,7 @@ PHONE_CARRIER=""
|
||||
PHONE_NUMBER=""
|
||||
PLAY_SOUND=""
|
||||
PROXY_ADDRESS=""
|
||||
PROXY_PROTOCOL=""
|
||||
PROXY_PORT=""
|
||||
PUSHBULLET=""
|
||||
PUSHOVER_TOKEN=""
|
||||
|
||||
@@ -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
@@ -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
@@ -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}`
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user