snail007 / goproxy

🔥 Proxy is a high performance HTTP(S) proxies, SOCKS5 proxies,WEBSOCKET, TCP, UDP proxy server implemented by golang. Now, it supports chain-style proxies,nat forwarding in different lan,TCP/UDP port forwarding, SSH forwarding.Proxy是golang实现的高性能http,https,websocket,tcp,socks5代理服务器,支持内网穿透,链式代理,通讯加密,智能HTTP,SOCKS5代理,黑白名单,限速,限流量,限连接数,跨平台,KCP支持,认证API。
https://snail007.host900.com/goproxy/manual/zh/
GNU General Public License v3.0
15.83k stars 3.01k forks source link

How and how can I forward specific domains to an upstream proxy? #381

Open elico opened 4 years ago

elico commented 4 years ago

I am pretty new to GoProxy and was wondering how would I be able to forward all intercepted traffic of .youtube.com and .ytimg.com to a specific upstream proxy which bumps/decrypts the connections?

I am currently running the proxy with the command: /usr/bin/proxy http -t tcp -p ":18443"

on a Linux server and I am intercepting these connections using iptables: iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 18443

I want to bump/decrypt traffic only for specific domains while all the others will be passed directly. The proxy I am using to decrypt the TLS traffic is: https://github.com/andybalholm/redwood/

snail007 commented 4 years ago

use function sps instead and use --hosts argument

dorsegal commented 7 months ago

Can it be done the other way around? Can I specify domain names that will not go though the proxy? i.e google.com should be fowled directly while YouTube.com will use proxy?

snail007 commented 7 months ago

goproxy commercial edition API Auth feature can do it.