Skip to content

Simple TCP server written in GO which reset every TCP connection for the test purpouses.

Notifications You must be signed in to change notification settings

findmyname666/tcp-rst-srv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

tcp-rst-srv

I created this "shitty" code just for the test purpouses e.g. I tested how reverse proxy server behave when it receives TCP reset from a backend.

There is required one argument -port to run the server:

$ go run main.go -port 9004
2023/02/28 16:36:30 Starting TPC server on '127.0.0.1:9004'
2023/02/28 16:36:53 TCP connection received from: 127.0.0.1:51028

By default the server listen on 127.0.0.1 only. This can be changed with argument -addr. Once the server is running you can test RESET behaviour:

$ curl -v http://127.0.0.1:9004
*   Trying 127.0.0.1:9004...
* Connected to 127.0.0.1 (127.0.0.1) port 9004 (#0)
> GET / HTTP/1.1
> Host: 127.0.0.1:9004
> User-Agent: curl/7.85.0
> Accept: */*
>
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer

About

Simple TCP server written in GO which reset every TCP connection for the test purpouses.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages