How samirbekjs/jprq works
JPRQ exposes a user’s local HTTP or arbitrary TCP service through a public tunnel. The CLI stores credentials, requests a tunnel, then relays incoming connections between the remote server and the local service; optional HTTP debugging observes relayed traffic. On the hosted side, the server authenticates and authorizes requests, provisions protocol-specific tunnels, and routes public traffic. The website handles browser-based GitHub token acquisition. README capabilities also include static-file serving, custom subdomains/CNAMEs, and debugger support. Some server internals were not excerpted, so relationships without direct evidence are omitted.
Main entry points: jprqc.go Tunnel client · jprq.go Tunnel coordinator · main.go Command entry · github.go GitHub auth
Components 22
CLI and client
- Command entry
cli/main.go - Tunnel client
cli/jprqc.go - Client config
cli/config.go - Static file server
cli/main.go
Tunnel service
- Server entry
server/main.go - Tunnel coordinator
server/jprq.go - TCP listeners
server/server/tcpserver.go - Tunnel events
server/events/events.go - TCP tunnel
server/tunnel/tcp_tunnel.go - HTTP tunnel
server/tunnel/http_tunnel.go - Connection relay
server/tunnel/tunnel.go
Identity and access
- GitHub auth
server/github/github.go - Server config
server/config/config.go - User allow-list
server/jprq.go
Auth website
- Auth website
website/main.go
HTTP debugging
- Debugger server
cli/debugger/server.go - HTTP parser
cli/debugger/parser.go - Debugger UI
cli/debugger/static/script.js
Other components
- CLI user
- Local service
- GitHub OAuth
- Access validation
Connections 31
- CLI user → Command entry: runs command
readme.md - Command entry → Client config: loads config
cli/main.go - Command entry → Client config: writes token
cli/main.go - Command entry → Static file server: starts serving
cli/main.go - Command entry → Tunnel client: starts tunnel
cli/main.go - Tunnel client → Client config: reads credentials
cli/jprqc.go - Tunnel client → Tunnel events: sends request
cli/jprqc.go - Tunnel client → Tunnel events: reads events
cli/jprqc.go - Tunnel client → Local service: dials service
cli/jprqc.go - Tunnel client → Connection relay: relays traffic
cli/jprqc.go - Server entry → Server config: loads config
server/main.go - Server entry → GitHub auth: creates authenticator
server/main.go - Server entry → Tunnel coordinator: initializes and starts
server/main.go - Tunnel coordinator → Server config: uses settings
server/jprq.go - Tunnel coordinator → GitHub auth: authenticates users
server/jprq.go - Tunnel coordinator → Tunnel events: reads and writes
server/jprq.go - Tunnel coordinator → TCP listeners: starts listeners
server/jprq.go - Tunnel coordinator → TCP tunnel: creates TCP tunnel
server/jprq.go - Tunnel coordinator → HTTP tunnel: creates HTTP tunnel
server/jprq.go - Tunnel coordinator → User allow-list: refreshes users
server/jprq.go - TCP tunnel → TCP listeners: initializes listeners
server/tunnel/tcp_tunnel.go - TCP tunnel → Connection relay: inherits relay handling
- HTTP tunnel → Connection relay: uses shared relay
- GitHub auth → GitHub OAuth: requests profile and token
server/github/github.go - GitHub auth → Access validation: checks access
server/github/github.go - Auth website → GitHub auth: uses OAuth client
website/main.go - Auth website → GitHub OAuth: redirects for OAuth
website/main.go - Tunnel client → Debugger server: starts optional debugger
cli/jprqc.go - Tunnel client → Debugger server: provides traffic streams
cli/jprqc.go - Debugger server → HTTP parser: parses streams
cli/debugger/server.go - Debugger UI → Debugger server: subscribes to events