Connecting to Shares¶
Learn how to connect to shared directories and access files securely.
Overview¶
Connecting to a share requires:
- Session credentials - ID and passcode from sharer
- Relay URL - WebSocket server address
- Network connectivity - Access to relay server
Basic Connection¶
Using Session Credentials¶
With Custom Relay¶
Connection Process¶
1. Relay Connection¶
The connector:
- Opens WebSocket connection
- Sends session ID
- Waits to be paired with sharer
2. Handshake¶
The connector:
- Initiates Noise Protocol handshake
- Derives encryption keys from passcode
- Establishes encrypted tunnel
3. File Browser Launch¶
[INFO] Launching file browser...
┌─ Remote Files ─────────────────┐
│ documents/ │
│ photos/ │
│ README.md │
└────────────────────────────────┘
The TUI browser opens, showing remote files.
Obtaining Credentials¶
From Sharer¶
The sharer will provide:
Important Notes¶
- Session ID: Can be shared openly
- Passcode: Must be kept secret
- Relay: Must be network-accessible
- Expiration: Sessions valid for 24 hours
Connection Scenarios¶
Local Network¶
Both on same network:
# Sharer starts relay
orb relay
# Sharer shares
orb share ~/files
# Connector connects
orb connect --session <ID> --passcode <CODE>
Over Internet¶
Using public/self-hosted relay:
# Sharer
orb share ~/files --relay ws://relay.example.com:8080
# Connector (from anywhere)
orb connect --session <ID> --passcode <CODE> --relay ws://relay.example.com:8080
Through SSH Tunnel¶
Secure connection via SSH:
# Create SSH tunnel
ssh -L 8080:localhost:8080 user@remote-server
# Connect through tunnel
orb connect --session <ID> --passcode <CODE> --relay ws://localhost:8080
Behind Firewall¶
If connector is behind restrictive firewall:
# Ensure relay uses standard ports (80/443)
# Or configure firewall to allow WebSocket
# Use wss:// (encrypted WebSocket) for HTTPS networks
Using the File Browser¶
Once connected, navigate with:
Navigation Keys¶
↑ork- Move up↓orj- Move downEnter- Enter directory or download fileBackspace- Go to parent directoryq- Quit
File Operations¶
Browse Directory:
Download File:
Parent Directory:
Download Location¶
Files download to your current working directory:
Connection Management¶
Active Connection¶
While connected:
Disconnection¶
To disconnect:
Reconnection¶
Within 24 hours:
# Use same credentials
orb connect --session <same-ID> --passcode <same-CODE>
# Fresh connection established
# File browser reopens
Troubleshooting Connection¶
Invalid Credentials¶
Causes:
- Wrong session ID
- Incorrect passcode
- Typo in credentials
Solutions:
- Double-check session ID
- Verify passcode (case-sensitive)
- Request credentials again
Connection Refused¶
Causes:
- Relay not running
- Wrong relay URL
- Network unreachable
- Firewall blocking
Solutions:
- Verify relay address
- Check relay is running:
curl http://relay:8080 - Test network connectivity
- Check firewall rules
Session Not Found¶
Causes:
- Session expired (>24h)
- Wrong session ID
- Session not created yet
Solutions:
- Verify session ID
- Check session age
- Ask sharer to create new session
Handshake Failed¶
Causes:
- Incorrect passcode
- Network interruption
- Crypto mismatch
Solutions:
- Verify passcode is exact
- Check network stability
- Try new session
Timeout¶
Causes:
- Sharer not connected
- Network latency
- Relay issues
Solutions:
- Confirm sharer is online
- Check network speed
- Try different relay
Security Considerations¶
Passcode Protection¶
The passcode is crucial:
- Used to derive encryption keys
- Provides authentication
- Must remain secret
Never share passcode via:
- Plain email
- SMS
- Public chat
- Unencrypted channels
Safe methods:
- Encrypted messaging (Signal, WhatsApp)
- Phone call
- In person
- Password manager
Verification¶
Before downloading sensitive files:
- Verify sharer identity out-of-band
- Confirm session credentials directly
- Check file integrity if needed
Network Security¶
When possible:
- Use
wss://(encrypted) instead ofws:// - Connect over VPN
- Use trusted relays
- Verify relay SSL certificate
Advanced Connection¶
Environment Variables¶
Set default relay:
export ORB_RELAY="ws://relay.example.com:8080"
orb connect --session <ID> --passcode <CODE>
# Uses ORB_RELAY automatically
Scripted Connection¶
#!/bin/bash
# connect.sh
SESSION=$1
PASSCODE=$2
if [ -z "$SESSION" ] || [ -z "$PASSCODE" ]; then
echo "Usage: ./connect.sh <session> <passcode>"
exit 1
fi
orb connect --session "$SESSION" --passcode "$PASSCODE" --relay ws://relay.example.com:8080
Timeout Handling¶
Connection Lifecycle¶
Phase 1: Relay Connection¶
Phase 2: Handshake¶
Phase 3: Active Session¶
Phase 4: Termination¶
Best Practices¶
1. Verify Before Connecting¶
# Check relay is reachable
curl -I http://relay.example.com:8080
# Then connect
orb connect --session <ID> --passcode <CODE> --relay ws://relay.example.com:8080
2. Use Clean Download Directory¶
# Create temporary download location
mkdir -p ~/Downloads/orb-session
cd ~/Downloads/orb-session
orb connect --session <ID> --passcode <CODE>
3. Close When Done¶
4. One Connection at a Time¶
# Currently: one session = one connection
# For multiple connectors: sharer creates multiple sessions
Use Cases¶
Download Project Files¶
cd ~/projects
orb connect --session <ID> --passcode <CODE>
# Navigate to project files
# Download needed files
Retrieve Documents¶
cd ~/Documents
orb connect --session <ID> --passcode <CODE>
# Browse document hierarchy
# Download specific documents
Access Remote Files¶
# Connect to home server from work
orb connect --session <ID> --passcode <CODE> --relay ws://home.example.com:8080
# Download needed files
Receive Client Files¶
# Client shares deliverables
cd ~/client-files
orb connect --session <ID> --passcode <CODE>
# Download all deliverables
Next Steps¶
- Learn TUI Browser features
- Read Security details
- Check Troubleshooting guide
- Explore Command Reference