Live data from Hacker News

High Performance TCP Proxy Server

partow.net

31–40 of 62 posts

Re: High Performance TCP Proxy Server

#31
post #2

If it meets the guidelines, this might make a good 'Show HN'. Show HN guidelines: https://news.ycombinator.com/showhn.html

I felt kinda bad tearing it apart and only did so because it wasn't posted as a ShowHN.

It's cool to show people an example of networking using Boost but the article and post have no mention of this being alpha quality software.

Re: High Performance TCP Proxy Server

#32
post #13

Earlier quoted context omitted.

C++ 17 Networking TS is based on ASIO. It will be very interesting if netty performs better than ASIO based code for the same task.

They both use epoll underneath. Netty will likely perform better because it has a robust thread pool implementation.

Would suggest to look at how thread pooling works in ASIO before making conclusions.

Re: High Performance TCP Proxy Server

#36
Why not just?

Linux: iptables -t nat -A PREROUTING -p tcp -s 192.168.20.200/0 -d 192.168.0.100/0 --dport 8080 -j REDIRECT --to-ports 20000

Windows: netsh interface portproxy add v4tov4 listenaddress=192.168.20.200 listenport=8080 connectaddress=192.168.0.100 connectport=20000 protocol=tcp

Re: High Performance TCP Proxy Server

#37
post #36

Why not just? Linux: iptables -t nat -A PREROUTING -p tcp -s 192.168.20.200/0 -d 192.168.0.100/0 --dport 8080 -j REDIRECT --to-ports 20000 Windows: netsh interface portproxy add v4tov4 listenaddress=192.168.20.200 listenport=8080 connectaddress=192.168.0.100 connectport=20000 protocol=tcp

Those require root/admin access.

Still, I agree.

Re: High Performance TCP Proxy Server

#38

Earlier quoted context omitted.

Netty is a more mature foundation for this sort of thing and likely much faster

Again, this is a really cool 300 loc snippet. No need to pull in the jvm if you're going to do something simple. As for performance, a reproducible benchmark is the minimum requirement to even start the conversation.

[deleted]

Re: High Performance TCP Proxy Server

#39
post #2

If it meets the guidelines, this might make a good 'Show HN'. Show HN guidelines: https://news.ycombinator.com/showhn.html

Darn...opening 2 sockets, read from one and write to the other, that qualifies as "show me mama...no hands" :) ?

It blows my mind that this is on the front page. It's not useful for anything, doesn't fully work, and can be replicated with a few lines on the console of BSD/Linux/windows.

Re: High Performance TCP Proxy Server

#40

Earlier quoted context omitted.

Darn...opening 2 sockets, read from one and write to the other, that qualifies as "show me mama...no hands" :) ?

It blows my mind that this is on the front page. It's not useful for anything, doesn't fully work, and can be replicated with a few lines on the console of BSD/Linux/windows.

Reminds of the time a friend wanted my opinion on a quote he received that it would take a week to open a socket in Unix using C code
Post reply on HN