.. _sandbox:
Interactive Sandbox
====================
Welcome to the Gatenet Interactive Sandbox! Here you can try out Gatenet features directly in your browser without installing anything.
.. note::
The sandbox provides a safe environment to experiment with Gatenet's networking tools. Some features may be limited in the browser environment.
Live Dashboard
--------------
The Gatenet dashboard provides an interactive web interface for network diagnostics:
.. raw:: html
🚀 Gatenet Live Dashboard
Experience the full Gatenet dashboard with ping, traceroute, DNS lookup, and port scanning tools.
Note: This is a demo instance. For full functionality, install Gatenet locally.
Interactive Code Examples
--------------------------
Try these code examples directly in your browser:
.. raw:: html
📦 HTTP Client Example
Output:
Click "Run Code" to see the output...
🔍 Network Diagnostics Example
Output:
Click "Run Code" to see the output...
🕵️ Service Discovery Example
Output:
Click "Run Code" to see the output...
Quick Start Playground
-----------------------
.. raw:: html
🎮 Quick Start Playground
Try common Gatenet operations with pre-configured examples:
🌐 HTTP Request
🔍 DNS Lookup
📡 Service Detection
🌍 Geo IP Lookup
Local Development
-----------------
To run your own Gatenet sandbox locally:
.. code-block:: bash
# Install Gatenet
pip install gatenet
# Launch the dashboard
python -c "from gatenet.dashboard import launch_dashboard; launch_dashboard()"
# Or create a custom sandbox
python -c "
from gatenet.dashboard.app import app
from gatenet.dashboard import launch_dashboard
@app.get('/api/sandbox')
def sandbox():
return {'message': 'Custom sandbox endpoint!'}
launch_dashboard(host='127.0.0.1', port=8000)
"
Try the Examples Locally
-------------------------
All sandbox examples are available as runnable scripts in the `examples/` directory:
.. code-block:: bash
git clone https://github.com/clxrityy/gatenet.git
cd gatenet/examples
# HTTP examples
python http_/http_example.py
python http_/async_client_usage.py
# Diagnostics examples
python diagnostics/dns_lookup.py
python diagnostics/port_scanning.py
# Discovery examples
python discovery/ssh_discovery.py
# Dashboard examples
python dashboard/launch_dashboard.py
.. note::
**Security Note**: The sandbox environment simulates network operations for demonstration purposes. Real network operations require appropriate permissions and may be restricted in browser environments.