Specifiy a custom config file for proxying multiple services:
$ net.proxy -config example_config.yml
The default config path is net.proxy-config.yml, so if this file exists in the folder where you execute the proxy, you do not need to specify it on the commandline.
Configuration
For proxying several services, you need to provide a config file, here is a simple example:
# Proxies map holds all reverse proxiesproxies:service1:local:127.0.0.1:443remote:http://127.0.0.1:8080tls:trueservice2:local:127.0.0.1:9999remote:http://192.168.1.20service3:local:127.0.0.1:7000remote:https://google.com# CertFile for TLS secured connectionscertFile:"certs/cert.crt"# KeyFile for TLS secured connectionskeyFile:"certs/cert.key"# Logdir is used as destination for the logfilelogdir:"logs"
Usage of net.proxy:
-version bool
print netcap package version and exit
-config string
set config file path (default "net.proxy-config.yml")
-debug
set debug mode
-dialTimeout int
seconds until dialing to the backend times out (default 30)
-idleConnTimeout int
seconds until a connection times out (default 90)
-local string
set local endpoint
-maxIdle int
maximum number of idle connections (default 120)
-remote string
set remote endpoint
-skipTlsVerify
skip TLS verification
-tlsTimeout int
seconds until a TLS handshake times out (default 15)