Skip to content

Latest commit

History

36 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

StrongTCP

A small program which will modify every packet from --queue num whose pkg_data_len >= 0, or DROP it otherwise.

As an immediate consequence, all RST packets are DROPped, which is favored in most situations.

To achieve that (on Linux) you will need the following

#include<netinet/in.h>#include<netinet/ip.h>#include<netinet/tcp.h>#include<arpa/inet.h>#include<linux/netfilter.h>/* for NF_ACCEPT */#include<libnetfilter_queue/libnetfilter_queue.h>

For those impatient

if (pkg_data_len >= 0)
{
blah(&manythings);
//magically tweaks the seq and ack_seq of original TCP headeru_int32_txor= (* (u_int16_t*) ((char*)tcph+12)) + ((* (u_int16_t*) ((char*)tcph+12)) << 16);
tcph->seq ^= xor;
tcph->ack_seq ^= xor;
returnnfq_set_verdict(qh, id, NF_ACCEPT, pkg_data_len, (u_int8_t*) pkg_data);
}
returnnfq_set_verdict(qh, id, NF_DROP, 0, NULL );

Build

  • Linux
cd src
make
  • Openwrt
make menuconfig
make
  • Android
ndk-build

About the author, of this README

  • Nobody is going to understand WTF does these code do without a README.md, so I wrote one
  • No copyright information provided

Disclaimer

  • removed according to regulation.

About

make TCP connections stronger to counter-GFW

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages