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

Proxy support? #218

Closed
pjv opened this issue Feb 14, 2023 · 7 comments
Closed

Proxy support? #218

pjv opened this issue Feb 14, 2023 · 7 comments

Comments

@pjv
Copy link

pjv commented Feb 14, 2023

How hard would it be to make gossip proxy aware?

My use-case is wanting to run gossip through local SOCKS5 / TOR proxies.

maybe helpful? : https://stackoverflow.com/questions/63992487/is-there-a-way-to-connect-through-a-proxy-while-using-websocket-in-rust

…or not - just re-read that SO and realized there was no solution in there.

@mikedilger
Copy link
Owner

If you run gossip on whonix everything goes through TOR. That can be done today.

But to honor a SOCKS5/TOR proxy directly, I think tungstenite would need to support it first. I could be wrong, maybe there is a way we can point tungstenite at the proxy without it being proxy-aware, but I don't think so. Would have to dig into SOCK5 to figure that one out.

@pjv
Copy link
Author

pjv commented Feb 14, 2023

Ya, hoping to avoid the overhead of spinning up a VM on my mac just to run gossip on it. I proxy a lot of different apps in various ways, but gossip is somehow ducking under my tools and i can’t get ahold of its networking.

@pjv
Copy link
Author

pjv commented Feb 14, 2023

@pjv
Copy link
Author

pjv commented Feb 16, 2023

this might be a full solution to adding proxy support for tungstenite: https://chuxi.github.io/posts/websocket/

some more stuff from the interwebs

snapview/tungstenite-rs#55

snapview/tungstenite-rs#177 (see especially snapview/tungstenite-rs#177 (comment))

websockets-rs/rust-websocket#258 (comment)

@mikedilger
Copy link
Owner

I'm not motivated to push forward on this right now as I've got so many higher priority things to do. But I would merge a sensible PR. And I like keeping this issue open so I can eventually get around to it.

@pjv
Copy link
Author

pjv commented Feb 19, 2023

i understand. If time opens up enough for me to take on learning rust, i may take a crack at it. likely you’ll get back to it someday before i do.

@mikedilger
Copy link
Owner

I think it is safest to isolate the entire gossip process, than for gossip to try to adjust all its network activity (I might miss some code). I recommend the following on ArchLinux, and with that I'm going to close this issue.

$ sudo systemctl enable tor.service
$ sudo systemctl start tor.service
$ sudo pacman -S torsocks
$ cargo build --release && torsocks ./target/release/gossip

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