User Tools

Site Tools


proxy_in_a_tweet

Proxy in a tweet

Source: https://twitter.com/heptajohn/status/957748274529734658

package main
 
import (
	"io"
	"net"
)
 
func main() {
	s, _ := net.Listen("tcp", ":8080")
	for {
		l, _ := s.Accept()
		r, _ := net.Dial("tcp", "localhost:8081")
		go io.Copy(l, r)
		go io.Copy(r, l)
	}
}
proxy_in_a_tweet.txt · Last modified: 2018/01/29 11:21 by luciano