Tiny packet forwarder for golang

Tiny Packet Forwarder

Usually, I use iptables on Linux to do forward. i encounter some problems sometime, for example:

  1. RDP disconnect immediately after connect, i don't know why, set TCP MSS to path MTU doesn't help.
  2. DNAT target in iptables seems doesn't support TCP BBR.
  3. iptables works on Linux only, i use windows sometime, i didn't know the syntax to set port forward on windows.

So i write a simple tool todo the job. It just suit my needs, nothing more.

run

Simple run the following command, it will read the rules from 'config.json'.

tpf_linux_amd64

you can also simply specify the rules in command line:

tpf_linux_amd64 tcp::3389:mydomain.com:3389 udp::3389:mydomain.com:3389 tcp::2222:ssh.mydomain.com:22

Note:

  1. whitelist is not supported if you specify rule in the command line
  2. In this form, the rules in config.json will still read and active, plus the rules you specify in the command line.

config

The config is a json file, the syntax is straight, please refer config_example.json. copy config_example.json to config.json and make necessary, the run the application, it will read the config automatically.

Similar Resources

A tiny command line DNS client with support for UDP, DoT, DoH, and DoQ.

A tiny command line DNS client with support for UDP, DoT, DoH, and DoQ.

q A tiny command line DNS client with support for UDP, DoT, DoH, and DoQ. Usage q command line DNS client (https://github.com/natesales/q) Usage: q

Jan 4, 2023

Automatically compress podcasts to tiny file sizes for bandwidth constrained devices like cellular.

Automatically compress podcasts to tiny file sizes for bandwidth constrained devices like cellular.

tinycast Automatically compress podcasts to tiny file sizes for bandwidth constrained connections like cellular or satellite.

Sep 18, 2022

Tiny utility to download file from GitHub

gget I needed a way to download file from GitHub without going to its raw version and I made this tiny program. If there is a way to do it with a cURL

Apr 16, 2022

A tiny client and server for tinysql

Tiny Client/Server a tiny client and server for tinysql. Start // start server

Dec 21, 2021

Hprose 1.0 for Golang (Deprecated). Hprose 2.0 for Golang is here:

Hprose for Golang Introduction Installation Usage Http Server Http Client Synchronous Invoking Synchronous Exception Handling Asynchronous Invoking As

Dec 15, 2022

A Minecraft scanner written in Golang (first Golang project)

__ __/ \__ Gothyc A Minecraft port scanner written in Go. 🐹 / \__/ \__ \__/ \__/ \ Version 0.3.0 \__/ \__/ Author @toas

Nov 6, 2022

Fast IP to CIDR lookup in Golang

Fast IP to CIDR lookup in Golang

cidranger Fast IP to CIDR block(s) lookup using trie in Golang, inspired by IPv4 route lookup linux. Possible use cases include detecting if a IP addr

Dec 30, 2022

High performance async-io(proactor) networking for Golang。golangのための高性能非同期io(proactor)ネットワーキング

High performance async-io(proactor) networking for Golang。golangのための高性能非同期io(proactor)ネットワーキング

gaio Introduction 中文介绍 For a typical golang network program, you would first conn := lis.Accept() to get a connection and go func(net.Conn) to start a

Dec 29, 2022

Gmqtt is a flexible, high-performance MQTT broker library that fully implements the MQTT protocol V3.1.1 and V5 in golang

中文文档 Gmqtt News: MQTT V5 is now supported. But due to those new features in v5, there area lots of breaking changes. If you have any migration problem

Jan 5, 2023
Related tags
A simple DNS forwarder that forwards DNS queries to various upstreams

A simple DNS forwarder that forwards DNS queries to various upstreams. If an upstream returns NXDomain, the next upstream is tried.

Jul 8, 2022
Packet Sniffer in golang

WirePenguin ?? A CLI Packet Sniffer in golang using Cobra and Gopacket packages much much simpler than WireShark =) You can capture packets both live

Dec 13, 2022
Provides packet processing capabilities for Go

GoPacket This library provides packet decoding capabilities for Go. See godoc for more details. Minimum Go version required is 1.5 except for pcapgo/E

Dec 29, 2022
Capture packet request/response pairs for a port and/or IP to aid in Network protocol based Nuclei Templates creation.

network-fingerprint Capture packet request/response pairs for a port and/or IP to aid in Network protocol based Nuclei Templates creation. Resources I

Nov 15, 2022
Go package to simulate bandwidth, latency and packet loss for net.PacketConn and net.Conn interfaces

lossy Go package to simulate bandwidth, latency and packet loss for net.PacketConn and net.Conn interfaces. Its main usage is to test robustness of ap

Oct 14, 2022
DNS Ping: to check packet loss and latency issues with DNS servers

DNSping DNS Ping checks packet loss and latency issues with DNS servers Installation If you have golang, easiest install is go get -u fortio.org/dnspi

Nov 18, 2022
Prometheus exporter for ping metrics such as RTT, packet loss, and jitter to any number of hosts.

ping_exporter Command ping_exporter provides a Prometheus exporter for ping metrics such as RTT, packet loss, and jitter to any number of hosts. Usage

Sep 24, 2022
Netkit - A type parameter(generics) net kit, support tcp kcp, customize packet

Netkit Netkit is a type parameter(generics) golang package Get Started Need Go i

Jan 12, 2022
A tiny calculator with RPN, written on golang

A tiny calculator with RPN, written on golang This is my first project on golang, so it is not as serious project as a lang skills practice. Anyway lo

Dec 15, 2021
gproxy is a tiny service/library for creating lets-encrypt/acme secured gRPC and http reverse proxies
gproxy is a tiny service/library for creating lets-encrypt/acme secured gRPC and http reverse proxies

gproxy is a reverse proxy service AND library for creating flexible, expression-based, lets-encrypt/acme secured gRPC/http reverse proxies GProxy as a

Sep 11, 2022