Complete sshd
This commit is contained in:
18
packages/sshecret-sshd/src/sshecret_sshd/settings.py
Normal file
18
packages/sshecret-sshd/src/sshecret_sshd/settings.py
Normal file
@ -0,0 +1,18 @@
|
||||
"""SSH Server settings."""
|
||||
|
||||
from pydantic import AnyHttpUrl, Field
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
|
||||
DEFAULT_LISTEN_PORT = 2222
|
||||
|
||||
class ServerSettings(BaseSettings, cli_parse_args=True, cli_exit_on_error=True):
|
||||
"""Server Settings."""
|
||||
|
||||
model_config = SettingsConfigDict(env_file=".sshd.env", env_prefix="sshecret_sshd_")
|
||||
|
||||
backend_url: AnyHttpUrl = Field(alias="backend-url")
|
||||
backend_token: str = Field(alias="backend-token")
|
||||
listen_address: str = Field(default="", alias="listen")
|
||||
port: int = DEFAULT_LISTEN_PORT
|
||||
debug: bool = False
|
||||
Reference in New Issue
Block a user