Netstack
Custom network stack in Go
Install / Use
/learn @dutchcoders/NetstackREADME
netstack
Custom network stack in Go
This networkstack implements (very) basic and rudimentary support for connecting tcp streams. There needs to be a lot to be implemented and optimised.
Projects
Currently netstack is being used by the following projects:
- https://github.com/dutchcoders/anam
Configuration
Linux will send RST packets for unknown tcp packets, so this needs to be disabled using iptables.
iptables -A OUTPUT -p tcp --tcp-flags RST RST -j DROP
iptables -I OUTPUT -p icmp --icmp-type destination-unreachable -j DROP
Samples
See samples folder.
References
- http://backreference.org/2010/03/26/tuntap-interface-tutorial/
- http://stackoverflow.com/questions/3062205/setting-the-source-ip-for-a-udp-socket
- http://stackoverflow.com/questions/12177708/raw-socket-promiscuous-mode-not-sniffing-what-i-write
- http://stackoverflow.com/questions/110341/tcp-handshake-with-sock-raw-socket
- http://devdungeon.com/content/packet-capture-injection-and-analysis-gopacket
- https://en.wikipedia.org/wiki/Transmission_Control_Protocol#/media/File:Tcp_state_diagram_fixed_new.svg
- https://github.com/mindreframer/golang-stuff/blob/master/github.com/pebbe/zmq2/examples/udpping1.go
- https://github.com/adamdunkels/uip/blob/master/uip/uip.c
- http://www.darkcoding.net/uncategorized/raw-sockets-in-go-ip-layer/
- http://lxr.free-electrons.com/source/net/ipv4/tcp.c<F37>
- https://www.freebsd.org/doc/en/books/developers-handbook/sockets-essential-functions.html
- http://stackoverflow.com/questions/8047728/how-to-set-linux-kernel-not-to-send-rst-ack-so-that-i-can-give-syn-ack-within-r
Related Skills
node-connect
351.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
