Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about replace iptables with proxychains4 #1

Open
yuantuo666 opened this issue Jul 16, 2024 · 1 comment
Open

Question about replace iptables with proxychains4 #1

yuantuo666 opened this issue Jul 16, 2024 · 1 comment

Comments

@yuantuo666
Copy link

In file local/iptable.sh, it actually redirects TCP requests to local proxy server.
I am wondering if this will work with tools like proxychains4.
Since in some situation, we do not have root privilege to change iptables setting, where proxychains4 might work.

@cheekyshibe
Copy link
Owner

cheekyshibe commented Jul 16, 2024

Tools like proxychains4 might be a viable alternative. I have not tested this way yet. By configuring xray to listen on a SOCKS protocol for its inbound connections instead of using a transparent proxy:

Change inbounds rule in local/config.json:

"inbounds": [
    {
        "port": 12306,
        "protocol": "socks",
        "settings": {
            "auth": "noauth",
            "udp": true
        }
    }

More details could be found in xray-core documents.

Your proxychains.conf should be configured like:

socks5 127.0.0.1 12306   # xray's protocol provide authorization

# Or directly connect to the forward proxy server, socks provide authorization
# This approach is suitable if you have a side router or other kinds of proxy service
socks5 123.123.123.123 12306 user password

But I recommend filtering the requests to be forwarded based on the target IP range, otherwise it may lead to unintended behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants