diff --git a/.copier-answers.yaml b/.copier-answers.yaml index 88bf5ce..39a9370 100644 --- a/.copier-answers.yaml +++ b/.copier-answers.yaml @@ -10,7 +10,7 @@ envprefix: LORIS events: false imagename: services/loris importname: loris -port: 11000 +port: 10400 registry: true releases: true reponame: loris diff --git a/docker-compose.yaml b/docker-compose.yaml index 604ce06..5044812 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -5,10 +5,10 @@ services: network: host environment: - "LORIS__SERVER__HOST=${LORIS__SERVER__HOST:-0.0.0.0}" - - "LORIS__SERVER__PORTS__HTTP=${LORIS__SERVER__PORTS__HTTP:-11000}" - - "LORIS__SERVER__PORTS__WHIP=${LORIS__SERVER__PORTS__WHIP:-11001}" - - "LORIS__SERVER__PORTS__RTP__MIN=${LORIS__SERVER__PORTS__RTP__MIN:-11002}" - - "LORIS__SERVER__PORTS__RTP__MAX=${LORIS__SERVER__PORTS__RTP__MAX:-11002}" + - "LORIS__SERVER__PORTS__HTTP=${LORIS__SERVER__PORTS__HTTP:-10400}" + - "LORIS__SERVER__PORTS__WHIP=${LORIS__SERVER__PORTS__WHIP:-10401}" + - "LORIS__SERVER__PORTS__RTP__MIN=${LORIS__SERVER__PORTS__RTP__MIN:-10402}" + - "LORIS__SERVER__PORTS__RTP__MAX=${LORIS__SERVER__PORTS__RTP__MAX:-10402}" - "LORIS__SERVER__TRUSTED=${LORIS__SERVER__TRUSTED:-*}" - "LORIS__STREAMER__STUN__HOST=${LORIS__STREAMER__STUN__HOST:-stun.l.google.com}" - "LORIS__STREAMER__STUN__PORT=${LORIS__STREAMER__STUN__PORT:-19302}" diff --git a/docs/docs/02-Usage.md b/docs/docs/02-Usage.md index 758751f..5388791 100644 --- a/docs/docs/02-Usage.md +++ b/docs/docs/02-Usage.md @@ -17,7 +17,7 @@ curl \ --request POST \ --header "Content-Type: application/json" \ --data '{"srt": {"host": "example.com", "port": 12345}}' \ - http://localhost:11000/stream + http://localhost:10400/stream ``` You should receive a response containing the port number and STUN server @@ -39,7 +39,7 @@ package: ```js import { WHIPClient } from "@eyevinn/whip-web-client"; -const endpoint = "http://localhost:11001/whip/endpoint"; +const endpoint = "http://localhost:10401/whip/endpoint"; const client = new WHIPClient({ endpoint }); const stream = await navigator.mediaDevices.getUserMedia({ audio: true }); @@ -63,7 +63,7 @@ gst-launch-1.0 \ queue \ ! \ whipclientsink \ - signaller::whip-endpoint="http://localhost:11001/whip/endpoint" + signaller::whip-endpoint="http://localhost:10401/whip/endpoint" ``` ## Ping @@ -78,5 +78,5 @@ For example, you can use `curl` to do that: curl \ --request HEAD \ --head \ - http://localhost:11000/ping + http://localhost:10400/ping ``` diff --git a/docs/docs/03-Configuration.md b/docs/docs/03-Configuration.md index ecd3c92..2032b37 100644 --- a/docs/docs/03-Configuration.md +++ b/docs/docs/03-Configuration.md @@ -12,16 +12,16 @@ You can configure the service at runtime using various environment variables: (default: `0.0.0.0`) - `LORIS__SERVER__PORTS__HTTP` - port to listen for HTTP requests on - (default: `11000`) + (default: `10400`) - `LORIS__SERVER__PORTS__WHIP` - ports to select from when listening for WHIP requests - (default: `11001`) + (default: `10401`) - `LORIS__SERVER__PORTS__RTP__MIN` - minimum port to select from when listening for RTP connections - (default: `11002`) + (default: `10402`) - `LORIS__SERVER__PORTS__RTP__MAX` - maximum port to select from when listening for RTP connections - (default: `11002`) + (default: `10402`) - `LORIS__SERVER__TRUSTED` - trusted IP addresses (default: `*`) diff --git a/src/loris/config/models.py b/src/loris/config/models.py index 85b81ab..4eb86ec 100644 --- a/src/loris/config/models.py +++ b/src/loris/config/models.py @@ -9,10 +9,10 @@ class ServerRTPPortsConfig(BaseModel): """Configuration for the server RTP ports.""" - min: int = Field(11002, ge=1, le=65535) + min: int = Field(10402, ge=1, le=65535) """Minimum port to select from when listening for RTP connections.""" - max: int = Field(11002, ge=1, le=65535) + max: int = Field(10402, ge=1, le=65535) """Maximum port to select from when listening for RTP connections.""" @model_validator(mode="after") @@ -27,10 +27,10 @@ def validate_ports(self) -> Self: class ServerPortsConfig(BaseModel): """Configuration for the server ports.""" - http: int = Field(11000, ge=0, le=65535) + http: int = Field(10400, ge=0, le=65535) """Port to listen for HTTP requests on.""" - whip: set[Annotated[int, Field(..., ge=1, le=65535)]] = Field({11001}, min_length=1) + whip: set[Annotated[int, Field(..., ge=1, le=65535)]] = Field({10401}, min_length=1) """Ports to select from when listening for WHIP requests.""" rtp: ServerRTPPortsConfig = ServerRTPPortsConfig()