How can I implement a proxy that handles both TCP and UDP in java? [closed]

冷暖自知 提交于 2020-01-05 05:51:08

问题


I was looking into proxy implementations (I am interested in using Java as programming language).
I was wondering, is a proxy supposed to work on all protocols? E.g. TCP and UDP
A single protocol, e.g. TCP only?
Are proxies usually application level e.g. HTTP?
Is it possible to implement a proxy that can proxy TCP and UDP connections?
If I need to build a proxy that reshapes traffic e.g. blocks/drops packets or making some connections slower than others should I be working on IP level? Higher levels?


回答1:


a proxy supposed to work on all protocols? E.g. TCP and UDP. A single protocol, e.g. TCP only?

It depends on whether it's a TCP proxy, a UDP proxy, both, or an application proxy.

Are proxies usually application level e.g. HTTP?

Yes, and application proxies always are.

If I need to build a proxy that reshapes traffic e.g. blocks/drops packets or making some connections slower than others should I be working on IP level? Higher levels?

IP level. I wouldn't even call it a proxy, more of a filter.



来源:https://stackoverflow.com/questions/17760623/how-can-i-implement-a-proxy-that-handles-both-tcp-and-udp-in-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!