I’ve been trying to get things in order before the end of last year and into this new year of 2025 so I can try to lessen any worries that might come up. I was doing a complete re-write of the core network-wide proxy-service and this time I have also tried to write it in both Python and C so the code bases so mostly match and line up with each other. The main problem I think is that I tried to generalize and condense the code base too much and I think this can cause problems as the packet tracking for UDP and connection state for TCP is a bit different from each other. This time I have separated out each component into its own dedicated section, the downside is that it’s a much larger code base with potentially duplicated code snippets. It’s a strange kind of project and hard to describe it but the best way I can think of it as is a Transparent Layer 4 MITM/Proxy service 😀
The core components now have the following layouts:
| Protocol | Mode | Operation |
| UDP | Client | Send |
| UDP | Client | Read |
| UDP | Server | Send |
| UDP | Server | Read |
| TCP | Client | Send |
| TCP | Client | Read |
| TCP | Server | Send |
| TCP | Server | Read |
Edit: Note to my future self, always remember to ulimit -n 65536 before launching!
Note: This post is a follow up from the previous: [post] [post]
I’m still fine tuning & adjusting it but the source code links can be found here:
https://github.com/stoops/pyproxy/
https://github.com/stoops/vpn/
~