A fast port forwarding or reverse forwarding tool over HTTP1.0/HTTP1.1

gogw

What's gogw ?

gogw is a port forwarding/reverse forwarding tool over HTTP implements by golang.

  • port forwarding/port reverse forwarding
  • support TCP/UDP
  • pure over HTTP1.0/HTTP1.1(no WebSocket) to avoid some firewall issues

How to use ?

Expose any service(TCP/UDP) behind a NAT or firewall to the internet

Suppose you have a host with public IP 11.11.11.11 and local host behind a firewall. You run a webservice on your local host port 80 and want others to access it.

  1. Edit the config file for gogw server
{
	"Server":{
		"ServerAddr":"0.0.0.0:80",
		"TimeoutSecond": 30
	}
}
  1. Run gogw server on your public host.
./gogw -c config.json -r server 
  1. Edit the config file for your local host to run gogw client.
{
	"Clients":[{
		"ServerAddr":"11.11.11.11:80",
		"SourceAddr":"127.0.0.1:80",
		"ToPort":81,
		"Protocol": "tcp",
		"Direction": "reverse",
		"Description":"webservice",
		"Compress": true,
		"HttpVersion": "http1.1"
	}]
}
  1. Run gogw client on your local host.
./gogw -c config.json -r client

Now your can access your web service through http://11.11.11.11:81

Listen local port and forward packets to remote server as a proxy

Suppose you have a local host A(10.0.0.2), local host B(10.0.0.3) and another host C(11.11.11.11) runing a web server on port 8080. You want the host B access C web server through A.

  1. Edit config.json for gogw server and client.
{
	"Server":{
		"ServerAddr":"0.0.0.0:80",
		"TimeoutSecond": 30
	},
	"Clients":[{
		"ServerAddr":"127.0.0.1:80",
		"SourceAddr":"11.11.11.11:80",
		"ToPort":81,
		"Protocol": "tcp",
		"Direction": "forward",
		"Description":"webservice",
		"Compress": true,
		"HttpVersion": "http1.1"
	}]
}
  1. Run gogw server and client on host A
# run server
./gogw -c config.json -r server

# run client
./gogw -c config.json -r client

Now host B can access host C web servie through http://10.0.0.2:81

Web ui

It has a simple web ui on gogw server. http://server_ip:server_port/ui ui

Status

Some functions or code improvements can be added:

  • authentication/encryption
  • more powerfull ui and monitor
  • unit test
  • ...

Any contribution is welcome even just a star :)

Similar Resources

Udp forward - Forwarding UPD requests with golang

udp_forward About tool I want to check how GOlang work with network... It tool t

Feb 3, 2022

A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.

A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.

frp README | 中文文档 What is frp? frp is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the Internet. As of now, it s

Jan 5, 2023

4chain is a simple、fast reverse proxy to help you expose a local server behind a NAT or firewall to the Internet.

4Chain What is 4chain? 4chain is a simple、fast reverse proxy to help you expose a local server behind a NAT or firewall to the Internet. Using the ssh

Nov 1, 2022

TProx is a fast reverse proxy path traversal detector and directory bruteforcer.

TProx is a fast reverse proxy path traversal detector and directory bruteforcer.

TProx is a fast reverse proxy path traversal detector and directory bruteforcer Install • Usage • Examples • Join Discord Install Options From Source

Nov 9, 2022

Chisel is a fast TCP/UDP tunnel, transported over HTTP, secured via SSH.

Chisel is a fast TCP/UDP tunnel, transported over HTTP, secured via SSH.

Chisel is a fast TCP/UDP tunnel, transported over HTTP, secured via SSH. Single executable including both client and server. Written in Go (golang). Chisel is mainly useful for passing through firewalls, though it can also be used to provide a secure endpoint into your network.

Jan 1, 2023

Fast time-series data storage server accessible over gRPC

tstorage-server Persistent fast time-series data storage server accessible over gRPC. tstorage-server is lightweight local on-disk storage engine serv

Sep 14, 2022

Woole (or Wormhole) is a reverse-proxy, sniffing, and tunneling tool developed in Go

The Wormhole (or just Woole) is an Open-Source reverse-proxy, sniffing, and tunneling tool developed in Go Summary How it Works Client Server Build Di

Jul 27, 2022

A C/S Tool to Download Torrent Remotely and Retrieve Files Back Over HTTP at Full Speed without ISP Torrent Limitation.

remote-torrent Download Torrent Remotely and Retrieve Files Over HTTP at Full Speed without ISP Torrent Limitation. This repository is an extension to

Sep 30, 2022
Comments
  • Ingest config

    Ingest config

    Would it be possible to "ingest" a config file and spit out a binary that doesn't need any other configuration. This would be awesome for ease of deployment on digital ocean instances. I could just spin up a new one and push an exe pre baked in with the configs ice chosen.

Related tags
rconn is a multiplatform program for creating generic reverse connections. Lets you consume services that are behind firewall or NAT without opening ports or port-forwarding.
rconn is a multiplatform program for creating generic reverse connections. Lets you consume services that are behind firewall or NAT without opening ports or port-forwarding.

rconn (r[everse] conn[ection]) is a multiplatform program for creating reverse connections. It lets you consume services that are behind NAT and/or fi

Jan 1, 2023
Simple HTTP tunnel using SSH remote port forwarding

Simple HTTP tunnel using SSH remote port forwarding

Nov 18, 2022
Simple forwarding a unix domain socket to a local port.

WaziApp Proxy WaziApp proxy is a simple http proxy that is intended to listen on the WaziApp unix socket /var/lib/waziapp/proxy.sock and forwards to a

Nov 18, 2021
grpc-http1: A gRPC via HTTP/1 Enabling Library for Go

grpc-http1: A gRPC via HTTP/1 Enabling Library for Go This library enables using all the functionality of a gRPC server even if it is exposed behind a

Dec 17, 2022
High-performance, non-blocking, event-driven, easy-to-use networking framework written in Go, support tls/http1.x/websocket.

High-performance, non-blocking, event-driven, easy-to-use networking framework written in Go, support tls/http1.x/websocket.

Jan 8, 2023
Port-proxy - Temporary expose port for remote connections

Port proxy util Temporary expose port for remote connections. E.g. database/wind

Jan 27, 2022
A reverse proxy implementing IRC-over-WebSockets

webircproxy webircproxy is a reverse proxy that accepts IRCv3-over-WebSocket connections, then forwards them to a conventional ircd that speaks the no

Dec 22, 2021
GoScan is a port-scanner made entirely in Go-lang. The purpose of the tool is to be fast, dynamic and simple so that a professional in the CyberSecurity area can make an optimized list of ports
GoScan is a port-scanner made entirely in Go-lang. The purpose of the tool is to be fast, dynamic and simple so that a professional in the CyberSecurity area can make an optimized list of ports

?? GoScan GoScan is a port-scanner made entirely in Go-lang. The purpose of the tool is to be fast, dynamic and simple so that a professional in the C

Jul 19, 2022
The devs are over here at devzat, chat over SSH!

Devzat Where are the devs at? Devzat! Devzat is chat over SSH Try it out: ssh sshchat.hackclub.com Add this to ~/.ssh/config: Host chat HostName s

Jan 7, 2023
NotifyTool - A message forwarding service for http to websocket

notifyTool this is a message forwarding service for http to websocket task webso

Jan 3, 2022