- Notifications
You must be signed in to change notification settings - Fork16
NetCrusher is a TCP/UDP proxy that allows to test services for failover
License
NetCrusherOrg/netcrusher-java
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
NetCrusher is TCP/UDP proxy framework for Java and a command line tool that could be placed in the middle between any client and server and allows to check both sides for failover.
- emulates network failures
- emulates frozen connection
- supports both TCP and UDP
- supports multiple dynamic connections through the same proxy tunnel
- allows to check the state of connections
- allows to filter/dump data
- supports throttling (delay and/or throughput control)
- garbage-less buffering
- high performance (16.6 Gbits on loopback interface of my laptop)
- supports IP4/IP6
NetCrusher is build on top of Java 8 NIO and has no external dependencies exceptSLF4J.
Readdocumentation.
Downloadlatest dist.tar.gz to get the command line tool.
NioReactorreactor =newNioReactor();TcpCrushercrusher =TcpCrusherBuilder.builder() .withReactor(reactor) .withBindAddress("localhost",10080) .withConnectAddress("google.com",80) .buildAndOpen();// ... some actions// emulate reconnectcrusher.reopen();// ... check the client connection is reestablished successfully// closingcrusher.close();reactor.close();
NioReactorreactor =newNioReactor();DatagramCrushercrusher =DatagramCrusherBuilder.builder() .withReactor(reactor) .withBindAddress("localhost",10188) .withConnectAddress("time-nw.nist.gov",37) .buildAndOpen();// ... some actions// check data is sentAssert.assertTrue(crusher.getInner().getReadDatagramMeter().getTotal() >0);// closingcrusher.close();reactor.close();
Checks additional samples in the project root folder:
For manual QA the command-line wrapper is available both for TCP and Datagram mode
$ ./run-tcp-crusher.sh 127.0.0.1:12345 google.com:80# Version: 0.8# Print `HELP` for the list of the commands# enter the command in the next lineCLOSE[20:19:20.586] INFO TcpCrusher </127.0.0.1:12345>-<google.com/64.233.161.101:80> is closed[20:19:20.586] INFO Crusher is closed# enter the command in the next lineOPEN[20:19:21.655] INFO TcpCrusher </127.0.0.1:12345>-<google.com/64.233.161.101:80> is open[20:19:21.655] INFO Crusher is openMore about the command line mode inwiki.
<dependency> <groupId>com.github.netcrusherorg</groupId> <artifactId>netcrusher-core</artifactId> <version>0.10</version></dependency>
Seewiki page
Apache License Version 2.0,http://www.apache.org/licenses/LICENSE-2.0.html
- Jepsen - Distributed Systems Safety Analysis
- Java-NIO-TCP-Proxy - Simple TCP proxy
- netem - Linux kernel module allows to distort network facilities
- socat - bridges everything with everything
About
NetCrusher is a TCP/UDP proxy that allows to test services for failover
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.