An open API service indexing awesome lists of open source software.

https://github.com/matteobaccan/sockredirector

Redirects TCP connections from one IP address and port to another
https://github.com/matteobaccan/sockredirector

hacktoberfest java logger multithreading portforward

Last synced: about 1 year ago
JSON representation

Redirects TCP connections from one IP address and port to another

Awesome Lists containing this project

README

          

# SockRedirector

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/fce631c07eac48b682d8da9aee4b5301)](https://www.codacy.com/app/matteobaccan/SockRedirector?utm_source=github.com&utm_medium=referral&utm_content=matteobaccan/SockRedirector&utm_campaign=Badge_Grade)
[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/matteobaccan/SockRedirector.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/matteobaccan/SockRedirector/context:java)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/matteobaccan/SockRedirector.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/matteobaccan/SockRedirector/alerts/)
[![Build Status](https://travis-ci.org/matteobaccan/SockRedirector.svg?branch=master)](https://travis-ci.org/matteobaccan/SockRedirector)
[![security status](https://www.meterian.io/badge/gh/matteobaccan/SockRedirector/security)](https://www.meterian.io/report/gh/matteobaccan/SockRedirector)
[![stability status](https://www.meterian.io/badge/gh/matteobaccan/SockRedirector/stability)](https://www.meterian.io/report/gh/matteobaccan/SockRedirector)
[![DepShield Badge](https://depshield.sonatype.org/badges/matteobaccan/SockRedirector/depshield.svg)](https://depshield.github.io)

Stars Badge
Forks Badge
Pull Requests Badge
Issues Badge
GitHub contributors
License Badge
[![GraalVM Build](https://github.com/matteobaccan/SockRedirector/actions/workflows/graalvm.yml/badge.svg)](https://github.com/matteobaccan/SockRedirector/actions/workflows/graalvm.yml)

Redirects TCP connections from one IP address and port to another

I have used this tool for many years. This tool allow to redirect the TCP data from a port of one ip to another remote port of a remote machine.

This tool is very usefull in complex network architecture, where there are some firewall that are open only from one machine to another.

In this situation you can put sockRedirector server on thrusted machine, and connect to remote server using this machine

The concept is very similar to a proxy, without the limitation of use only http connection or the problem to write a socks interface.

Java sockRedirector is written in Java.

Use this program in Linux, Windows, AIX, AS/400 or all environment you want.

## Documentation

### sockRedirector.ini
Ini file is divided in several section For each section you can define these parameters

|key| type | default | value |
|--|--|--|--|
| source | string | **mandatory** | source ip to bind, listen on |
| sourceport | int | **mandatory** | source port to bind, listen on |
| destination | string | **mandatory** | destionation to bind |
| destinationport | int | **mandatory** | destionation port to bind |
| log | boolean | true | Create a log under logs/sockRedirector.log |
| timeout | int | 0 | source socket timeout (seconds) |
| client | int | 10 | max connected client to the source |
| blocksize | int | 64000 | size of buffer to read from source and destination |
| inReadWait | long | 0 | reading from destination pause |
| inWriteWait | long | 0 | writing to destination pause |
| outReadWait | long | 0 | reading from source pause |
| outWriteWait | long | 0 | write to source pause |
| randomKill | long | 0 | random kill of thread within N seconds |

## Example
### Configuration Example (sockRedirector.ini)

```xml

127.0.0.1
80
1.1.1.1
80
true
0
50
0
0
0
1000

```