Skip to content

ICE settings and network auto-detection #22

@JoTurk

Description

@JoTurk
  • - ICE modes.

Allow Ion to operate in ICE Lite mode for scenarios where the SFU has a public IP and can be passive in ICE negotiations.
In ICE Lite mode, Ion will only respond to connectivity checks instead of performing its own check attempts.
We need to set the Pion ICE agent to lite mode
This should be the default settings ice_mode = auto, every time ion restarts it does detection to try to detect where it's running.
ION should also support running behind NAT.

  • - Add NAT1To1 IP mapping configuration for SFU

Implement support for 1:1 NAT mappings in the SFU's ICE configuration. This allows Ion to advertise an external public IP (or range of IPs) when running behind NAT or in a container environment. support multiple IP mappings and ensure this works in conjunction with ICE Lite (e.g., a lite server behind a static NAT).

  • Implement auto-detection of network settings (STUN-based public IP discovery)

Add logic for Ion to automatically detect its network environment and adjust ICE settings at runtime. On startup, Ion should be able to determine if it's behind a NAT and find its public IP if not explicitly configured. For example, Ion can perform a STUN binding request to a well-known STUN server (or one provided in config) to retrieve its server-reflexive address. If a public IP is discovered and differs from the local IP, Ion can auto-apply that as a NAT1To1 mapping for ICE. additionally, Ion could detect the presence of multiple network interfaces and choose the likely public-facing one by default.
The goal is to have sensible auto-configuration so that in many cases manual network config isn't required the SFU will self-tune (e.g., enabling ICE Lite or using the discovered public IP) based on the environment. This should be logged for transparency and only applied when explicit config is absent (or set to auto).

  • - support port mapping for running ion in container like environments.

currently lacks Pion's support, pion/webrtc#3155

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions