Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
DestAddr = "127.0.0.1:8000"
)
var Logger = log.New(os.Stderr, "cdn2proxy: ", log.Ldate|log.Ltime|log.Lmicroseconds|log.Lshortfile)
use this logger
Functions ¶
func Socks5Auth ¶
func StartProxy ¶
StartProxy on client side, start a socks5 proxy url: websocket server. eg: wss://example.com/path/to/ws use wss instead of ws since your reverse proxy (nginx, Cloudflare) should be using TLS addr: local proxy address, used as agent's outgoing proxy proxy: proxy for websocket connection, if you cannot directly connect to ws server, use this eg. socks5://127.0.0.1:1080 doh: DNS over HTTPS server, eg. https://9.9.9.9/dns-query, prevent DNS leaks
func StartServer ¶
StartServer start websocket server port: listen on 127.0.0.1:port destAddr: send everything here, we only want a single purpose proxy wspath: access this path to reach ws service, eg. /ws if you use go-cdn2proxy along with other HTTP server, prevent multiple `/`
Types ¶
This section is empty.