roj1

module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2026 License: MIT

README

🏮 Roj1 (Roji)

CI Status Go Report Card

Roj1 (pronounced as Roji, Japanese for "alleyway") is a lightweight tool that carves a private, 1-to-1 path between any two points on the internet. Share Minecraft servers, AI APIs, or local databases directly and securely—without port forwarding, static IPs, or middleman fees.

Why Roj1?

While the public internet becomes increasingly crowded and monetized, Roj1 offers a quiet, hidden passage.

  • Zero Tolls: No subscriptions, no bandwidth caps, and no infrastructure costs.
  • Pure P2P: Your data stays between you and your peer. No traffic ever touches a central relay server.
  • Single Binary: A single Go binary. No drivers, no complex networking, just a direct link.
  • NAT-Proof: Effortlessly traverses home routers and mobile hotspots using STUN/WebRTC.
  • Lightweight: The core is built using only the gorilla/websocket and pion/webrtc libraries.

Common Use Cases

Service The Host (Source) The Peer (Destination) The Experience
Gaming Run Minecraft dedicated server on port 25565. Set port 25565 in Roj1 and establish the connection. Join the server via 127.0.0.1. Low latency, no Hamachi bloat, even for heavy modpacks.
AI / LLM Host your AI service (e.g., Ollama (11434)) on your GPU rig. Map to any available local port in Roj1 and connect. Use remote GPU power as if the AI were running natively on your laptop.
Self-Hosted Tools Run collaboration platforms like Mattermost, Wiki.js, or Penpot locally. Same as above Teams can collaborate on self-hosted instances without VPS or cloud deployment.

Getting Started

Prerequisites (Host Only)

The Host needs Visual Studio Code installed to handle the initial handshake via its native Port Forwarding feature (requires a GitHub login).

Setup
  1. Download: Get the latest binary for your OS from the Releases page.
  2. Launch: Run the executable in your terminal.
For the Host:
  1. Launch roj1 and select Host.
  2. Enter your local service port (e.g., 25565).
  3. In VS Code's Ports panel, forward the port provided by the CLI and set visibility to Public.
  4. Share the generated Forwarded URL with your peer.
  5. Once connected, you can stop the VS Code forward; the P2P tunnel is now independent.
For the Peer:
  1. Launch roj1 and select Client.
  2. Paste the URL provided by the Host.
  3. Choose a local port to map the service to.
  4. Access the service at 127.0.0.1:<your_port>.

CLI Arguments

For automation or LAN setups, Roj1 can be launched entirely from the command line, bypassing the interactive prompts. If -role is omitted, the tool falls back to the default interactive mode.

Flag Description Applies To
-role host or client Both
-port Target port (Host) or virtual service port (Client) Both
-wsPort WebSocket signaling server port (default: random) Host
-wsUrl WebSocket URL to connect to Client
-wsListen Listen on all network interfaces (LAN-accessible) Host
-debug Enable debug logging Both

Host example:

roj1 -role host -port 25565 -wsPort 9000 -wsListen

Client example:

roj1 -role client -port 25565 -wsUrl ws://192.168.1.10:9000/ws

TIP: When both machines are on the same local network, use -wsListen on the Host to make the WebSocket signaling server directly reachable via LAN IP. This eliminates the need for VS Code Port Forwarding entirely — the Client simply connects using ws://<host-lan-ip>:<wsPort>/ws.


Network Compatibility

  • Optimal: Fiber, Home Wi-Fi, 4G/5G mobile hotspots.
  • Limited: Strict corporate firewalls (Symmetric NAT) or public Wi-Fi with P2P blocking.

Support

Report bugs or suggest features via GitHub Issues. Please include your OS version and any error logs.

Directories

Path Synopsis
cmd
roj1 command
Roj1 — CLI entry point.
Roj1 — CLI entry point.
internal
adapter
Package adapter manages the post-transport lifecycle of a P2P tunnel.
Package adapter manages the post-transport lifecycle of a P2P tunnel.
protocol
Package protocol defines the packet format and types for the P2P tunnel.
Package protocol defines the packet format and types for the P2P tunnel.
signaling
Package signaling orchestrates the complete signaling phase — from user input to an established P2P tunnel.
Package signaling orchestrates the complete signaling phase — from user input to an established P2P tunnel.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL