Skip to content

Help Needed: NAT Traversal Solution for P2P Connections #1

@mimeosd

Description

@mimeosd

Problem Statement

The biggest challenge facing FreeViewer is establishing connections between computers behind different NATs/routers without requiring manual port forwarding.

Current Situation

Working: LAN connections (same network)
Working: Direct IP with manual port forwarding
Not Working: P2P connections between two computers behind NATs

Technical Details

  • Attempted STUN server implementation for external IP discovery
  • Session code sharing through paste services implemented
  • UDP hole punching attempted but unreliable
  • Both peers behind symmetric NATs cannot connect

What We've Tried

  1. STUN Servers - Successfully gets external IP, but can't traverse symmetric NATs
  2. Paste Services (dpaste, hastebin) - For sharing connection info, but JSON decode errors
  3. UDP Hole Punching - Implemented but doesn't work consistently

Error Example

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

When trying to fetch session data from paste services

Potential Solutions

Looking for help with:

  1. WebRTC Implementation - Industry standard but complex
  2. TURN Server Integration - Use free public TURN servers as relay fallback
  3. Better Hole Punching - More robust implementation
  4. Alternative Approach - Any creative solutions welcome

Skills Needed

  • Network programming experience
  • Understanding of NAT traversal techniques
  • Python networking libraries
  • P2P protocol knowledge

Files to Look At

  • p2p_connector.py - Current P2P implementation
  • main.py - Connection handling

Why This Matters

Without solving this, users need to:

  • Configure port forwarding (technical barrier)
  • Use relay services like ngrok (defeats the "free" purpose)
  • Limit to LAN-only use

This is the #1 blocker preventing FreeViewer from being truly competitive with commercial solutions.

Any help or suggestions appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions