Skip to main content

No project description provided

Project description

中文

ProxyNT is a reverse proxy server that can expose a local server to the internet through NATs and firewalls

原理

Features

  1. Open port mapping via browser anytime and anywhere
  2. Encrypted transmission between public network server and local network client via WebSocket
  3. Few dependencies, one-click installation via pip
  4. Stable, automatically reconnect, and already in production environment
  5. Support for rate limiting

Common Scenarios

  1. Hosting website server at home
  2. Managing IoT devices

Installation

pip install -U proxynt

Example: Accessing an Internal Network Machine via SSH

Suppose the public server's IP is 192.168.9.224.

1. Create config_s.json file on the public network machine

config_s.json content:

{
  "port": 18888,
  "password": "helloworld",
  "path": "/websocket_path",
  "admin": {
    "enable": true,  
    "admin_password": "new_password"  
  }
}

Then start: nt_server -c config_s.json

Explanation:

  • port: Listening port
  • password: Connection password
  • path: WebSocket path
  • admin: Management page configuration (optional)
  • admin.enable: Whether to enable management page
  • admin.admin_password: Management password

2. Create config_c.json file on the local network computer that needs to be accessed

config_c.json content:

{
  "server": {
    "port": 18888,
    "host": "192.168.9.224",
    "https": false,
    "password": "helloworld",
    "path": "/websocket_path"
  },
  "client_name": "home_pc",
  "client": []
}

Then start: nt_client -c config_c.json

Explanation:

  • server: Configuration of the server to be connected, including port, IP address, whether to use HTTPS, password, and WebSocket path.
  • client_name: Client name, needs to be unique.
  • client: Empty array.

3. Open the server webpage http://192.168.9.224:18888/websocket_path/admin and add a port:

VWCvq.md.png

Explanation: The management page path is WebSocket path + /admin .

4. Configuration succeeded, use SSH to connect:

ssh -oPort=12222 [email protected]

Complete Configuration Instructions (please delete the comments when using)

  • Client config_c.json
{
  "server": {  // Server configuration to connect to
    "port": 18888,  // Port
    "host": "192.168.9.224",  // IP address
    "https": false,  // Whether the server is using HTTPS
    "password": "helloworld",  // Password
    "path": "/websocket_path"  // WebSocket path
  },
  "client": [  // List of forwarding configurations
    {
      "name": "ssh",
      "remote_port": 1222,
      "local_port": 22,
      "local_ip": "127.0.0.1"
    },
    {
      "name": "mongo",
      "remote_port": 1223,
      "local_port": 27017,
      "local_ip": "127.0.0.1"
    }
  ],
  "client_name": "ubuntu1",  // Client name, must be unique
  "log_file": "/var/log/nt/nt.log"  // Path to log file
}
  • Server config_c.json
{
    "port": 18888,  // Listening port
    "password": "helloworld",  // Password
    "path": "/websocket_path",  // WebSocket path
    "log_file": "/var/log/nt/nt.log",  // Path to log file
    "admin": {  
        "enable": true,  // Whether to enable admin page
        "admin_password": "new_password"  // Password for admin page
    }
}

Stargazers over time

Stargazers over time

Update history

  • 1.1.9: Bandwidth limitation
  • 1.1.8: Display client version
  • 1.1.7: Fixed duplicate client_name
  • 1.1.6: Fixed client WebSocketException: socket is already opened.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

proxynt-1.1.11.tar.gz (342.8 kB view details)

Uploaded Source

Built Distribution

proxynt-1.1.11-py3-none-any.whl (368.9 kB view details)

Uploaded Python 3

File details

Details for the file proxynt-1.1.11.tar.gz.

File metadata

  • Download URL: proxynt-1.1.11.tar.gz
  • Upload date:
  • Size: 342.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for proxynt-1.1.11.tar.gz
Algorithm Hash digest
SHA256 5a8228b24132476fede39ccd5e6ec995579306c2470af49251ecae5ff05ee3a4
MD5 f14b037e94237fc70e2898c922b08016
BLAKE2b-256 331c5be5aefbc82c75db3e752a5e8f4dcfde47881e3b5254a27527400345d410

See more details on using hashes here.

File details

Details for the file proxynt-1.1.11-py3-none-any.whl.

File metadata

  • Download URL: proxynt-1.1.11-py3-none-any.whl
  • Upload date:
  • Size: 368.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for proxynt-1.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 a8924e22f9741feed4d80ef1b2d435de6cf33eb16b071375c16f5d95a934449e
MD5 d2706b6dedbf280a57614dad98fc32f1
BLAKE2b-256 43bf384a05f829c987cef1731d6ac3851386c42bd6d61f34db05da9cb4874e2d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page