nssh 0.23.6__py3-none-win_amd64.whl

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.
nssh/__init__.py ADDED
@@ -0,0 +1,7 @@
1
+ """nssh - SSH reverse tunnel client.
2
+
3
+ 本包不包含 Python 实现的隧道逻辑,仅作为 Go 编译的原生二进制包装器,
4
+ 通过 subprocess 拉起同目录 bin/ 下的 nssh / nssh.exe 并透传参数。
5
+ """
6
+
7
+ __version__ = "0.0.0"
nssh/bin/__init__.py ADDED
File without changes
nssh/bin/nssh ADDED
Binary file
nssh/cli.py ADDED
@@ -0,0 +1,27 @@
1
+ """nssh 命令行入口:定位并拉起同目录的 Go 原生二进制。"""
2
+
3
+ import os
4
+ import subprocess
5
+ import sys
6
+
7
+
8
+ def _binary_path():
9
+ """返回平台对应的二进制绝对路径(不存在则返回 None)。"""
10
+ here = os.path.dirname(os.path.abspath(__file__))
11
+ name = "nssh.exe" if os.name == "nt" else "nssh"
12
+ path = os.path.join(here, "bin", name)
13
+ return path if os.path.exists(path) else None
14
+
15
+
16
+ def main():
17
+ binary = _binary_path()
18
+ if binary is None:
19
+ # pkg_resources 里文件路径可能指向已解压位置,二次兜底用 sys.executable 物理路径无意义,
20
+ # 直接提示安装不完整。
21
+ sys.stderr.write(
22
+ f"[nssh] 缺少平台二进制: {os.path.join(os.path.dirname(os.path.abspath(__file__)), 'bin')}\n"
23
+ "[nssh] 请通过 pip 安装对应的平台包,或检查安装是否被截断。\n"
24
+ )
25
+ return 1
26
+ ret = subprocess.run([binary, *sys.argv[1:]])
27
+ return ret.returncode if ret.returncode is not None else 1
@@ -0,0 +1,40 @@
1
+ Metadata-Version: 2.4
2
+ Name: nssh
3
+ Version: 0.23.6
4
+ Summary: SSH reverse tunnel client - expose local services behind NAT to the internet
5
+ License-Expression: MIT
6
+ Keywords: ssh,tunnel,reverse-tunnel,nat,内网穿透
7
+ Classifier: Intended Audience :: Developers
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Operating System :: POSIX :: Linux
10
+ Classifier: Operating System :: MacOS :: MacOS X
11
+ Classifier: Operating System :: Microsoft :: Windows
12
+ Requires-Python: >=3.8
13
+ Description-Content-Type: text/markdown
14
+
15
+ # NSSH
16
+
17
+ SSH 反向隧道客户端,用于将 NAT 或防火墙后的本地服务通过 SSH 服务器暴露到公网。
18
+
19
+ 本组件提供 Python 包分发(wheel),内部包装 Go 编译的 nssh 原生二进制,不包含 Python 实现的隧道逻辑。
20
+
21
+ ## 安装
22
+
23
+ ```bash
24
+ pip install nssh
25
+ ```
26
+
27
+ ## 使用
28
+
29
+ ```bash
30
+ # 密码认证
31
+ nssh -R 8080:localhost:80 user@your-server.com -p 22 --passwd your_password
32
+
33
+ # SSH 密钥认证
34
+ nssh -R 8080:localhost:80 user@your-server.com -p 22 -i ~/.ssh/id_rsa
35
+
36
+ # 守护进程模式
37
+ nssh --daemon -R 8080:localhost:80 user@your-server.com -p 22 --passwd your_password
38
+ ```
39
+
40
+ 更多用法见:https://github.com/Vrolist/nssh
@@ -0,0 +1,9 @@
1
+ nssh/__init__.py,sha256=-DkUrUwFi389XihwM-7WH5J9DE-AzvOP3czx0Hvq9sk,242
2
+ nssh/cli.py,sha256=q4elpBY1mS9WBW9KtVnsfjT23WyMgSUaXXdV18eIWkE,1033
3
+ nssh/bin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ nssh/bin/nssh,sha256=eWI7jsbs57NsXtijZ6yh4vcy9aZolT0TGH2gLMHeWjA,7232512
5
+ nssh-0.23.6.dist-info/METADATA,sha256=yPCiooF3qNLliZZnvjFrZ1xM5vXuyW0x4d0qwK2FzCU,1178
6
+ nssh-0.23.6.dist-info/WHEEL,sha256=3I5VVWZdsFlU417aCS2bMRuerS8wsfvBq99MyatBV3A,97
7
+ nssh-0.23.6.dist-info/entry_points.txt,sha256=lVFnQrPnSW1Knw9YemmxWggWvdp0OLZ0WTRc7ym0Tmc,39
8
+ nssh-0.23.6.dist-info/top_level.txt,sha256=l_41NV0ZQMQiBtuq6cG97pdxx-d-f4MiEEH2J5zs-eI,5
9
+ nssh-0.23.6.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-win_amd64
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ nssh = nssh.cli:main
@@ -0,0 +1 @@
1
+ nssh