depositec / udp-reflector Goto Github PK
View Code? Open in Web Editor NEWtool to support reflecting (proxying, forwarding) of udp traffic on a source port to a mirrored destination port
License: GNU General Public License v3.0
tool to support reflecting (proxying, forwarding) of udp traffic on a source port to a mirrored destination port
License: GNU General Public License v3.0
udp reflector ------------- udp_reflector is a tool to support the reflecting of udp traffic on a source port to a mirrored destination port. Data is captured at the data link layer using libpcap. This allows another process to bind to the port, and avoids the error "Bind: Address Already in Use". udp_reflector supports both multiple packet destinations and multiple ignore ports which are used to prevent the infinite looping of packets between multiple udp_reflectors. WARNING: UNSAFE --------------- WARNING: This is super hacky and unsafe tool, it obviously has a lot of risky buffer overflow etc. opportunities, and probably some undefined behaviors too; don't use it for anything bigger than a short session for debugging and quick tunneling. On the other hand, the code is super small and easy to understand and tweak if needed. License ------- udp_reflector is licensed under the GNU GPL 3.0. Original source code was forked from the Subversion repository at the project's homepage: http://code.google.com/p/udp-reflector/ The fork is available at: https://github.com/depositec/udp-reflector Required software ----------------- The gnu c++ compiler is required for compilation on Linux, along with the libpcap development headers and libraries. Installation of libpcap is required for execution. Visual Studio 2010 Express is required for compilation on Windows. Installation of WinPcap and the Microsoft Visual C++ 2010 Redistributable Package is required for execution. Program options --------------- -e, assume no ethernet header on frame (e.g. for VPN tun interfaces) -s, source pcap interface and port -d, destination ip address and port -b, bind reflector socket to a specific source port (defaults to nonbinding) -i, ignore all UDP trafic originating from a specific source port -v, enable verbose debugging -l, list network devices -h, show this help message Usage Examples -------------- 1) Unidirectional - one way port forward examples (half duplex singleton). a) Reflect all UDP traffic on port 3000 from source pcap0 interface, to port 3200 of the broadcast destination address 192.168.1.255. Enable verbose debugging. udp_reflector -s pcap0:3000 -d 192.168.1.255:3200 -v b) Reflect all UDP traffic on port 3000 from source pcap1 interface, to port 3100 of the destination address 192.168.1.10 and 3200 of the destination address 192.168.1.15. Bind reflector socket to port 50000, and ignore UDP packets that originated on ports 25000 and 25001. udp_reflector -s pcap1:3000 -d 192.168.1.10:3100 -d 192.168.1.15:3200 \ -b 50000 -i 25000 -i 25001 2) Bidirectional - two way port forward example (full duplex matched pair). a) Reflect all UDP traffic on port 3000 from source pcap3 interface, to port 3200 of the broadcast destination address 192.168.1.255. Reflect all UDP traffic on port 3200 from source pcap5 interface, to port 3000 of the broadcast destination address 192.168.1.255 Note the use of the -b and -i options. This allows other applications to bind to these destination ports, but prevents the infinite looping of packets between the udp_reflectors. udp_reflector -s pcap3:3000 -d 192.168.1.255:3200 -b 50001 -i 50002 udp_reflector -s pcap5:3200 -d 192.168.1.255:3000 -b 50002 -i 50001
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.