Skip to content

Vibe-coded TCP-over-HTTP tunnel: SOCKS5 proxy β†’ HTTP relay β†’ TCP connector. A fun experiment, not remotely reliable. 🚧

License

Notifications You must be signed in to change notification settings

Hixon10/http-bridge-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

HTTP Socks5 Bridge proxy

An app that tunnels TCP connections over HTTP polling, split into three components that can run on different machines. The only requirement is HTTP connectivity between them.

⚠️ WARNING: THIS IS A TOY PROJECT ⚠️

This was vibe-coded in a single chat session with an AI for fun and learning. Do not use this for anything. Not for production. Not for staging.

Components

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    SOCKS5     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     HTTP      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     HTTP      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     TCP       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚          β”‚ ────────────► β”‚              β”‚ ────────────► β”‚              β”‚ ────────────► β”‚              β”‚ ────────────► β”‚          β”‚
β”‚  Firefox β”‚               β”‚  http-bridge β”‚               β”‚    bridge    β”‚               β”‚  http-bridge β”‚               β”‚  Remote  β”‚
β”‚  / curl  β”‚               β”‚  -client     β”‚               β”‚   _server.py β”‚               β”‚  -server     β”‚               β”‚  Server  β”‚
β”‚          β”‚ ◄──────────── β”‚              β”‚ ◄──────────── β”‚              β”‚ ◄──────────── β”‚              β”‚ ◄──────────── β”‚          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
   Client                   SOCKS5 Proxy                   HTTP Relay                    TCP Connector                   Target
   (your machine)           (your machine)                 (anywhere)                    (has network access)            (e.g. example.com)
Component Language Role
http-bridge-client Rust Local SOCKS5 proxy. Accepts connections from browsers/curl, translates them into HTTP API calls
bridge_server.py Python Central relay server. Buffers data between the SOCKS5 side and the TCP side via a simple HTTP API
http-bridge-server Rust TCP connector. Auto-discovers sessions, opens real TCP connections to targets, relays data through the bridge

Full end-to-end flow now

# Terminal 1: Python bridge server
python bridge_server.py

# Terminal 2: http-bridge-server (just sits and watches for new sessions)
cd http-bridge-server && cargo run

# Terminal 3: SOCKS5 proxy
cd http-bridge-client && cargo run

# Terminal 4: test
curl --socks5 127.0.0.1:1080 http://example.com

How It Works

  1. Firefox connects to the local SOCKS5 proxy and requests a connection to example.com:443
  2. http-bridge-client calls POST /session/create on the bridge server with the target address
  3. bridge_server.py creates a new session and returns a unique session_id
  4. http-bridge-server periodically polls GET /debug/sessions, discovers the new session
  5. http-bridge-server opens a real TCP connection to example.com:443
  6. Data flows bidirectionally:
    • Browser β†’ SOCKS5 β†’ HTTP POST /debug/{id}/send β†’ bridge β†’ POST /session/{id}/read β†’ tcp-http-bridge β†’ TCP β†’ remote
    • Remote β†’ TCP β†’ tcp-http-bridge β†’ POST /session/{id}/write β†’ bridge β†’ GET /debug/{id}/recv β†’ SOCKS5 β†’ browser

About

Vibe-coded TCP-over-HTTP tunnel: SOCKS5 proxy β†’ HTTP relay β†’ TCP connector. A fun experiment, not remotely reliable. 🚧

Topics

Resources

License

Stars

Watchers

Forks