[GH-ISSUE #381] How and how can I forward specific domains to an upstream proxy? #291

Open
opened 2026-02-27 23:16:21 +03:00 by kerem · 3 comments
Owner

Originally created by @elico on GitHub (Jul 14, 2020).
Original GitHub issue: https://github.com/snail007/goproxy/issues/381

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/

Originally created by @elico on GitHub (Jul 14, 2020). Original GitHub issue: https://github.com/snail007/goproxy/issues/381 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/
Author
Owner

@snail007 commented on GitHub (Jul 15, 2020):

use function sps instead and use --hosts argument

<!-- gh-comment-id:658666471 --> @snail007 commented on GitHub (Jul 15, 2020): use function sps instead and use --hosts argument
Author
Owner

@dorsegal commented on GitHub (Mar 28, 2024):

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?

<!-- gh-comment-id:2026009030 --> @dorsegal commented on GitHub (Mar 28, 2024): 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?
Author
Owner

@snail007 commented on GitHub (Mar 29, 2024):

goproxy commercial edition API Auth feature can do it.

<!-- gh-comment-id:2026420131 --> @snail007 commented on GitHub (Mar 29, 2024): goproxy commercial edition API Auth feature can do it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/goproxy#291
No description provided.