Skip to main content

GNS3 Proxy based on proxy.py by Abhinav Singh (https://github.com/abhinavsingh/proxy.py)

Project description

Proof-of-concept for a Proxy Server for GNS3. The proxy is configured as a regular remote server in the GNS3-GUI, as the GNS3-GUI client does not yet support proxies [gns3-gui issue #2696](https://github.com/GNS3/gns3-gui/issues/2696). Basic idea is to allow the use of central GNS3 server backends for classroom / lab setups, as used, e.g., in the Network Laboratory of Fulda University of Applied Sciences. Students can connect to the proxy and requests will be authenticated, filtered and forwarded to appropriate backend servers. Proxy authentication also circumvents the current lack of multi-user support in GNS3. Without the proxy, due to the single user limitation (see “MULTIPLE USERS ENVIRONMENT” in [GNS3 Security](https://docs.gns3.com/1ON9JBXSeR7Nt2-Qum2o3ZX0GU86BZwlmNSUgvmqNWGY/index.html)), users will have to use the same admin credentials for GNS3 to access the backend. Also, requests cannot be filtered and authorized (e.g., to deny deletion/creation of projects etc.). As GNS3 does not support proxies, several tweaks were necessary to the forked proxy.py project to allow transparent REST and WebSocket passthrough.

![alt text](https://travis-ci.org/srieger1/gns3-proxy.svg?branch=develop “Build Status”)

Features

Inherited from proxy.py: - Distributed as a single file module - No external dependency other than standard Python library - Support for http, https and websockets request proxy - Optimized for large file uploads and downloads - IPv4 and IPv6 support

Changes/enhancements to proxy.py: - Redirect requests to backend servers (fixed proxing independent from request URL) - Definition of users (username and password used in GNS3-GUI) for authentication and authorization at the proxy, proxy replaces credentials for backend servers - Definition of allowed clients - Selection (mapping) of GNS3 backend server and possibility of load-balancing based on client IP and username (using regexp) - Filtering of denied requests to server backends (based on username, REST/HTTP method/URL path/headers/body (using regexp) - Configuration file to allow basic proxy configuration (as for proxy.py) as well as GNS3 backend server, users, clients, mappings and request filter - Support REST calls (GET requests with body etc.) - Fixes and tweaks to allow the connection to GNS3 backends, especially keeping connections alive and leaving HTTP headers to support direct passthrough of WebSocket connections - Basic access logging/status monitoring support

Usage

Copy gns3_proxy.py and gns3_proxy_config.ini to a host that has Python >=3.4 installed. Only change necessary in the GNS3 server, is to edit the regular gns3_server.conf (available in the appliance terminal and, e.g., used to change username password etc., see also [GNS3 server configuration file](https://docs.gns3.com/1f6uXq05vukccKdMCHhdki5MXFhV8vcwuGwiRvXMQvM0/index.html)) and change the hostname from 0.0.0.0 to the IP address the server should listen on, e.g.:

host = 192.168.1.100

After that, run gns3_proxy.py and configure GNS3-GUI to use this host as a remote GNS3 server. By default, the proxy listens on 127.0.0.1 and TCP port 14080.

Download files

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

Source Distribution

gns3-proxy-0.2.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

gns3_proxy-0.2-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

Details for the file gns3-proxy-0.2.tar.gz.

File metadata

  • Download URL: gns3-proxy-0.2.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for gns3-proxy-0.2.tar.gz
Algorithm Hash digest
SHA256 549d88da0012244c9da72b12e748a3bfd3e5fee02e61a7f4bc4c6a6813f770eb
MD5 c8996449734b636077addcddbd6ce6f4
BLAKE2b-256 b4ee65a09637c3372d676ed2ff77035f8be0b40409bf7bb8d32cd670d53b10f9

See more details on using hashes here.

File details

Details for the file gns3_proxy-0.2-py3-none-any.whl.

File metadata

  • Download URL: gns3_proxy-0.2-py3-none-any.whl
  • Upload date:
  • Size: 23.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for gns3_proxy-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1404c9f44b00e652fa227b1ecc6067c2bc49f7d2e96cf12dfd59797b86c69c50
MD5 de85d4ade62c0021dfbfb693e2978ff0
BLAKE2b-256 dd8deeacb15ab314322baa730beb61804127f231bf94275124c8fed30d67d417

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