# l-codes/neo-regeorg architecture

> Architecture diagram of the GitHub repository l-codes/neo-regeorg, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/l-codes/neo-regeorg
- Repository: https://github.com/l-codes/neo-regeorg

## Overview

Neo-reGeorg provides a Python client that exposes a local SOCKS5 proxy or port forward through HTTP(S), plus server-side tunnel scripts generated for several runtimes. The main workflow is local proxy traffic → client protocol requests → uploaded server tunnel → target TCP service, with a separate server-script generation workflow. The excerpts show the client listener and protocol handling and several server implementations; other documented template variants are represented at their shared templates directory, with their internal behavior not inspected.

Main entry points: [`neoreg.py`](https://github.com/l-codes/neo-regeorg/blob/master/neoreg.py) (SOCKS5 / Forward Client), [`templates/NeoreGeorg.java`](https://github.com/l-codes/neo-regeorg/blob/master/templates/NeoreGeorg.java) (Java Tunnel), [`templates/tunnel.cs`](https://github.com/l-codes/neo-regeorg/blob/master/templates/tunnel.cs) (.NET Tunnel), [`templates/tunnel.js`](https://github.com/l-codes/neo-regeorg/blob/master/templates/tunnel.js) (Node.js Tunnel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Python Client"]
  node_client["SOCKS5 / Forward Client<br/>[neoreg.py]"]
  node_protocol["BLV and Encoding<br/>[neoreg.py]"]
end

subgraph group_generation["Server Generation"]
  node_generator["Template Generator<br/>[neoreg.py]"]
  node_template_outputs["Generated Tunnel Scripts"]
end

subgraph group_servers["Tunnel Servers"]
  node_java["Java Tunnel<br/>[NeoreGeorg.java]"]
  node_dotnet[".NET Tunnel<br/>[tunnel.cs]"]
  node_node["Node.js Tunnel<br/>[tunnel.js]"]
  node_go["Go Tunnel Server<br/>[tunnel.go]"]
  node_php["PHP Tunnel<br/>[tunnel.php]"]
  node_other_templates["Other Runtime Templates"]
end

subgraph group_transport["Network Endpoints"]
  node_web_server(("Web Server"))
  node_tcp_target(("TCP Target"))
end

node_local_app(("Local Application"))

node_local_app -->|"opens proxy"| node_client
node_client -->|"encodes requests"| node_protocol
node_client -->|"sends HTTP requests"| node_web_server
node_web_server -->|"returns responses"| node_client
node_generator -->|"generates scripts"| node_template_outputs
node_template_outputs -->|"uploaded for hosting"| node_web_server
node_web_server -.->|"runs tunnel"| node_java
node_web_server -.->|"runs tunnel"| node_dotnet
node_web_server -.->|"runs tunnel"| node_node
node_web_server -.->|"runs tunnel"| node_go
node_web_server -.->|"runs tunnel"| node_php
node_web_server -.->|"runs tunnel"| node_other_templates
node_java -->|"opens TCP socket"| node_tcp_target
node_dotnet -.->|"opens TCP socket"| node_tcp_target
node_node -->|"opens TCP socket"| node_tcp_target
node_go -->|"dials TCP target"| node_tcp_target
node_php -->|"opens TCP socket"| node_tcp_target

click node_client "https://github.com/l-codes/neo-regeorg/blob/master/neoreg.py"
click node_protocol "https://github.com/l-codes/neo-regeorg/blob/master/neoreg.py"
click node_generator "https://github.com/l-codes/neo-regeorg/blob/master/neoreg.py"
click node_java "https://github.com/l-codes/neo-regeorg/blob/master/templates/NeoreGeorg.java"
click node_dotnet "https://github.com/l-codes/neo-regeorg/blob/master/templates/tunnel.cs"
click node_node "https://github.com/l-codes/neo-regeorg/blob/master/templates/tunnel.js"
click node_go "https://github.com/l-codes/neo-regeorg/blob/master/templates/tunnel.go"
click node_php "https://github.com/l-codes/neo-regeorg/blob/master/templates/tunnel.php"
click node_other_templates "https://github.com/l-codes/neo-regeorg/tree/master/templates"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_client,node_protocol toneBlue
class node_generator,node_template_outputs toneAmber
class node_java,node_dotnet,node_node,node_go,node_php,node_other_templates toneMint
class node_web_server,node_tcp_target toneRose
class node_local_app toneIndigo
```

## Components

### Python Client

- [SOCKS5 / Forward Client](https://github.com/l-codes/neo-regeorg/blob/master/neoreg.py): `neoreg.py`
- [BLV and Encoding](https://github.com/l-codes/neo-regeorg/blob/master/neoreg.py): `neoreg.py`

### Server Generation

- [Template Generator](https://github.com/l-codes/neo-regeorg/blob/master/neoreg.py): `neoreg.py`
- **Generated Tunnel Scripts**

### Tunnel Servers

- [Java Tunnel](https://github.com/l-codes/neo-regeorg/blob/master/templates/NeoreGeorg.java): `templates/NeoreGeorg.java`
- [.NET Tunnel](https://github.com/l-codes/neo-regeorg/blob/master/templates/tunnel.cs): `templates/tunnel.cs`
- [Node.js Tunnel](https://github.com/l-codes/neo-regeorg/blob/master/templates/tunnel.js): `templates/tunnel.js`
- [Go Tunnel Server](https://github.com/l-codes/neo-regeorg/blob/master/templates/tunnel.go): `templates/tunnel.go`
- [PHP Tunnel](https://github.com/l-codes/neo-regeorg/blob/master/templates/tunnel.php): `templates/tunnel.php`
- [Other Runtime Templates](https://github.com/l-codes/neo-regeorg/tree/master/templates): `templates`

### Network Endpoints

- **Web Server**
- **TCP Target**

### Other components

- **Local Application**

## Connections

- Local Application → SOCKS5 / Forward Client: opens proxy (evidence: `README.md`)
- SOCKS5 / Forward Client → BLV and Encoding: encodes requests (evidence: `neoreg.py`)
- SOCKS5 / Forward Client → Web Server: sends HTTP requests (evidence: `README.md`)
- Web Server → SOCKS5 / Forward Client: returns responses (evidence: `neoreg.py`)
- Template Generator → Generated Tunnel Scripts: generates scripts (evidence: `README.md`)
- Generated Tunnel Scripts → Web Server: uploaded for hosting (evidence: `README.md`)
- Web Server → Java Tunnel: runs tunnel
- Web Server → .NET Tunnel: runs tunnel
- Web Server → Node.js Tunnel: runs tunnel
- Web Server → Go Tunnel Server: runs tunnel
- Web Server → PHP Tunnel: runs tunnel
- Web Server → Other Runtime Templates: runs tunnel
- Java Tunnel → TCP Target: opens TCP socket (evidence: `templates/NeoreGeorg.java`)
- .NET Tunnel → TCP Target: opens TCP socket
- Node.js Tunnel → TCP Target: opens TCP socket (evidence: `templates/tunnel.js`)
- Go Tunnel Server → TCP Target: dials TCP target (evidence: `templates/tunnel.go`)
- PHP Tunnel → TCP Target: opens TCP socket (evidence: `templates/tunnel.php`)
