sshler 0.7.2__tar.gz → 0.7.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sshler-0.7.2/sshler.egg-info → sshler-0.7.4}/PKG-INFO +1 -1
- {sshler-0.7.2 → sshler-0.7.4}/pyproject.toml +1 -1
- {sshler-0.7.2 → sshler-0.7.4}/sshler/cli.py +9 -1
- {sshler-0.7.2 → sshler-0.7.4}/sshler/settings.py +2 -2
- {sshler-0.7.2 → sshler-0.7.4}/sshler/webapp.py +8 -9
- {sshler-0.7.2 → sshler-0.7.4/sshler.egg-info}/PKG-INFO +1 -1
- {sshler-0.7.2 → sshler-0.7.4}/LICENSE +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/MANIFEST.in +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/README.md +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/scripts/check_frontend_dist.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/setup.cfg +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/__init__.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/api/__init__.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/api/archive.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/api/auth.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/api/batch.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/api/boxes.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/api/config.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/api/dependencies.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/api/files.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/api/grep.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/api/helpers.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/api/models.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/api/rate_limiting.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/api/recovery.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/api/search.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/api/sessions.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/api/snippets.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/api/terminal.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/api/tunnels.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/auth.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/config.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/config_cache.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/rate_limit.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/scripts/install-sshler-task.ps1 +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/scripts/remove-sshler-task.ps1 +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/scripts/run-sshler.ps1 +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/session.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/snapshot.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/spa.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/ssh.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/ssh_config.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/ssh_pool.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/state.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/base.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/command-palette.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/Alert-C0caXY3O.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/BoxesView-Cw5NiFP6.css +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/BoxesView-DCsH8F6Q.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/DirectoryPickerModal-CVB_AH0M.css +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/DirectoryPickerModal-DlIkiyp1.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/FilesView-BFEnr1Va.css +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/FilesView-jrF0GwSm.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/Grid-B_OzHEym.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/InputNumber-XDnEotgL.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/LoginView-BLrnakeI.css +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/LoginView-C2biy_5H.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/MultiTerminalView-C8x4yNn3.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/MultiTerminalView-UnOQ5utL.css +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/NotFoundView-DYaoqkDb.css +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/NotFoundView-D_GMBtkq.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/OverviewView-BSwVX2Hs.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/OverviewView-SxVVVBkg.css +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/PhCircle.vue-BD-yU_HB.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/PhHouse.vue-BwwabvLx.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/PhPlus.vue-ChJ-UG0M.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/PhPushPinSimple.vue-DBP-0k94.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/PhTrash.vue-N4dJGebi.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/SettingsView-DCCByJuu.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/SettingsView-xrtebMdI.css +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/Spin-13rKpfWM.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/Switch-DsrNJCg_.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/TerminalView--aIl3nME.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/TerminalView-DKOHtH_z.css +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/favorites-CJMYgFyA.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/index-BCipBsn9.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/assets/index-Cwi9_lHU.css +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/favicon.png +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/fonts/MonaspaceNeon-Bold.woff2 +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/fonts/MonaspaceNeon-Regular.woff2 +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/fonts/MonaspaceNeon-Variable.woff2 +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/icon-192.png +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/icon-512-maskable.png +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/icon-512.png +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/index.html +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/logo.png +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/dist/manifest.webmanifest +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/favicon-terminal-local.svg +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/favicon-terminal.svg +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/favicon.png +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/favicon.svg +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/file-browser.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/file-edit.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/file-view.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/logo.png +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/manifest.json +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/multi-session.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/style.css +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/sw.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/term.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/vendor/xterm/xterm-addon-fit.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/vendor/xterm/xterm-addon-search.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/vendor/xterm/xterm.css +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/static/vendor/xterm/xterm.js +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler/validation.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler.egg-info/SOURCES.txt +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler.egg-info/dependency_links.txt +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler.egg-info/entry_points.txt +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler.egg-info/requires.txt +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/sshler.egg-info/top_level.txt +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/tests/test_api_v1.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/tests/test_archive.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/tests/test_basic.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/tests/test_batch_ops.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/tests/test_command_injection.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/tests/test_config.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/tests/test_database_indexes.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/tests/test_dev_workflow.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/tests/test_grep.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/tests/test_handshake_status.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/tests/test_httpx_ws.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/tests/test_path_validation.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/tests/test_rate_limit.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/tests/test_search.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/tests/test_session_auth.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/tests/test_snippets.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/tests/test_ssh.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/tests/test_tunnels.py +0 -0
- {sshler-0.7.2 → sshler-0.7.4}/tests/test_websocket.py +0 -0
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
|
5
5
|
|
|
6
6
|
[project]
|
|
7
7
|
name = "sshler"
|
|
8
|
-
version = "0.7.
|
|
8
|
+
version = "0.7.4"
|
|
9
9
|
description = "A local FastAPI-powered SSH multiplexer for tmux-in-browser — from your laptop only."
|
|
10
10
|
readme = "README.md"
|
|
11
11
|
requires-python = ">=3.12"
|
|
@@ -358,8 +358,16 @@ def serve(
|
|
|
358
358
|
指定したホストとポートでリクエスト受付を開始します。
|
|
359
359
|
"""
|
|
360
360
|
|
|
361
|
+
# Auto-add the actual listening address to allowed origins
|
|
362
|
+
# so origin checks pass regardless of custom port
|
|
363
|
+
auto_origins = list(allow_origins or [])
|
|
364
|
+
listen_origins = {f"http://{host}:{port}", f"http://localhost:{port}", f"http://127.0.0.1:{port}"}
|
|
365
|
+
for o in listen_origins:
|
|
366
|
+
if o not in auto_origins:
|
|
367
|
+
auto_origins.append(o)
|
|
368
|
+
|
|
361
369
|
settings = ServerSettings(
|
|
362
|
-
allow_origins=
|
|
370
|
+
allow_origins=auto_origins,
|
|
363
371
|
csrf_token=token or secrets.token_urlsafe(32),
|
|
364
372
|
max_upload_bytes=max_upload_mb * 1024 * 1024,
|
|
365
373
|
allow_ssh_alias=allow_ssh_alias,
|
|
@@ -27,8 +27,8 @@ class SshlerSettings(BaseSettings):
|
|
|
27
27
|
host: str = Field(default="127.0.0.1", description="Host to bind to")
|
|
28
28
|
port: int = Field(default=8822, description="Port to bind to")
|
|
29
29
|
public_url: str = Field(
|
|
30
|
-
default="
|
|
31
|
-
description="Public URL where sshler is accessible (used for CORS/origin checks)",
|
|
30
|
+
default="",
|
|
31
|
+
description="Public URL where sshler is accessible (used for CORS/origin checks). Auto-derived from host:port if empty.",
|
|
32
32
|
)
|
|
33
33
|
|
|
34
34
|
# Session/Cookie settings
|
|
@@ -756,18 +756,17 @@ def make_app(settings: ServerSettings | None = None) -> FastAPI:
|
|
|
756
756
|
parsed_origin = urlparse(origin)
|
|
757
757
|
origin_base = f"{parsed_origin.scheme}://{parsed_origin.netloc}"
|
|
758
758
|
|
|
759
|
-
# Parse expected origin from public_url
|
|
760
|
-
parsed_public = urlparse(app_settings.public_url)
|
|
761
|
-
expected_origin = f"{parsed_public.scheme}://{parsed_public.netloc}"
|
|
762
|
-
|
|
763
759
|
# Check if origin matches public_url or is in allowed_origins
|
|
764
760
|
# Include both env-based origins (SshlerSettings) and CLI-based origins (ServerSettings)
|
|
765
761
|
cli_settings: ServerSettings = request.app.state.settings
|
|
766
|
-
allowed_origins = (
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
762
|
+
allowed_origins = list(cli_settings.allow_origins) + app_settings.allowed_origins_list
|
|
763
|
+
|
|
764
|
+
# Add public_url-derived origin if set
|
|
765
|
+
if app_settings.public_url:
|
|
766
|
+
parsed_public = urlparse(app_settings.public_url)
|
|
767
|
+
expected_origin = f"{parsed_public.scheme}://{parsed_public.netloc}"
|
|
768
|
+
if expected_origin not in allowed_origins:
|
|
769
|
+
allowed_origins.append(expected_origin)
|
|
771
770
|
|
|
772
771
|
if origin_base not in allowed_origins:
|
|
773
772
|
logging.warning(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|