Home

Awesome

jrinetd

jrinetd is an open source (Apache License, Version 2.0) Java TCP port redirector proxy. Do not require any external lib.

Current Stable Version is 1.1.2


DOC

Schema about Forward / Port Redirector:

Forward / Port Redirector

  1. Machine-A (Client) init connection to Machine-B (jrinetd)
  2. Machine-B init connection to Machine-C (Server)
  3. Done: Machine-A is able to speak with Machine-C
Notes about security:

System Properties (optional)

# To redir stdout/stderr to (auto-daily-rotated) files you can use:
-Dlog.stdOutFile=/var/log/jrinetd.out -Dlog.stdErrFile=/var/log/jrinetd.err
# To log to stdout too:
-Dlog.stdToo=true 
Filenames are a base-pattern, output files they will be: jrinetd.xxx.YEAR-MONTH-DAY (jrinetd.xxx.2015-08-01)

Config (jrinetd.conf)

Config file must be in class-path ${JRINETD_HOME}/conf/, general format is:

#### Forward / Port Redirector
## forward <listen-addr>:<listen-port> <endpoint-list> [opts]

# Note: <endpoint-list> can be a coma separated list of addresses, like "srv1:80,srv2:80,10.0.0.3:8080"
Options are comma separated:
Example config of Forward / Port Redirector:
# <listen-addr>:<listen-port> <endpoint-list> [opts]
forward 0.0.0.0:80 10.0.0.1:8080,10.0.0.2:8080
forward 127.0.0.1:443 www.acme.com:443 LB=RR,STICKY=MEM:24:128:300:sticky1

Running (Linux)

./bin/jrinetd.sh <start|stop|restart|reload|status>

TODOs

DONEs

MISC

Current harcoded values:


Latency Benchmark

<table> <tr align="right"> <th>microsecs</th> <th>Direct</th> <th>Forward</th> </tr> <tr align="right"> <th>min</th> <td>?</td> <td>?</td> </tr> <tr align="right"> <th>max</th> <td>?</td> <td>?</td> </tr> <tr align="right"> <th>avg</th> <td>?</td> <td>?</td> </tr> </table>

Throughput Benchmark

<table> <tr align="right"> <th>(transfers)</th> <th>Direct (x2)</th> <th>Forward (x4)</th> </tr> <tr align="right"> <th>Mbytes</th> <td>?</td> <td>?</td> </tr> <tr align="right"> <th>Mbits</th> <td>?</td> <td>?</td> </tr> </table>
All test run on localhost on a Laptop. Values are not accurate, but orientative. Latency { EchoServer, 1 byte write/read (end-to-end, round-trip), 100K iterations } Lower Better. Throughput { Chargen, 1024bytes read & write (full-duplex), total 512MBytes } Higher better.

Inspired in rinetd, this is a Java-minimalistic version.