Files
frigate/frigate/config/network.py
T
Nicolas MowenandGitHub 4ee12e6237
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
CI / Jetson Jetpack 6 (push) Waiting to run
Increase ruff coverage (#23644)
* Pin ruff

* Add python upgrade fixes

This enables python upgrade checks in ruff to look for deprecated types and patterns. This namely fixes:
- usage of deprecated `Typing` which is now built in
- some specific exceptions which are caught and have new aliases

Some specific UP checks were also ignored as they are stylistic / unimportant and likely to cause bugs

* Remove async blocking calls

Use asyncio.to_thread on two remaining blocking calls to fix hanging event thread loop. Enable this specific rule to block it in the future.

* Use proper logging mechanism

* Correctly format logs

* Raise with context

When raising an exception include the from context to improve debugging

* Cleanup
2026-07-06 12:28:02 -05:00

40 lines
1.3 KiB
Python

from pydantic import Field
from .base import FrigateBaseModel
__all__ = ["IPv6Config", "ListenConfig", "NetworkingConfig"]
class IPv6Config(FrigateBaseModel):
enabled: bool = Field(
default=False,
title="Enable IPv6",
description="Enable IPv6 support for Frigate services (API and UI) where applicable.",
)
class ListenConfig(FrigateBaseModel):
internal: int | str = Field(
default=5000,
title="Internal port",
description="Internal listening port for Frigate (default 5000).",
)
external: int | str = Field(
default=8971,
title="External port",
description="External listening port for Frigate (default 8971).",
)
class NetworkingConfig(FrigateBaseModel):
ipv6: IPv6Config = Field(
default_factory=IPv6Config,
title="IPv6 configuration",
description="IPv6-specific settings for Frigate network services.",
)
listen: ListenConfig = Field(
default_factory=ListenConfig,
title="Listening ports configuration",
description="Configuration for internal and external listening ports. This is for advanced users. For the majority of use cases it's recommended to change the ports section of your Docker compose file.",
)