{"id":38179736,"url":"https://github.com/wikylyu/mtop","last_synced_at":"2026-01-16T23:46:54.611Z","repository":{"id":79107780,"uuid":"592182113","full_name":"wikylyu/mtop","owner":"wikylyu","description":"Vision at mountain top","archived":false,"fork":false,"pushed_at":"2024-06-16T15:44:27.000Z","size":351,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-21T06:42:49.229Z","etag":null,"topics":["fanqiang","network","proxy","quic","tls"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wikylyu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-23T06:02:33.000Z","updated_at":"2024-06-16T15:44:30.000Z","dependencies_parsed_at":"2023-11-13T04:25:33.499Z","dependency_job_id":"e947e54d-4c02-4008-889d-31e2cbf75908","html_url":"https://github.com/wikylyu/mtop","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/wikylyu/mtop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikylyu%2Fmtop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikylyu%2Fmtop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikylyu%2Fmtop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikylyu%2Fmtop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wikylyu","download_url":"https://codeload.github.com/wikylyu/mtop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikylyu%2Fmtop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28488251,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T22:54:02.790Z","status":"ssl_error","status_checked_at":"2026-01-16T22:50:10.344Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fanqiang","network","proxy","quic","tls"],"created_at":"2026-01-16T23:46:53.543Z","updated_at":"2026-01-16T23:46:54.601Z","avatar_url":"https://github.com/wikylyu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MTop\n\n`Enjoy the vision at mountain top.`\n\nMTop is a simple network proxy. It's based on TLS with a very simple and understandable protocol.\n\n## What it is and what it is not\n\nMTop follows the principle -- `do one thing and do it well`.\n\nMTop is just a network proxy for data forwarding. It provides below features:\n\n* User auth with username/password\n* Transport protocol is configurable. By default, it's TLS1.3, and [QUIC](https://en.wikipedia.org/wiki/QUIC) is supported. More transport protocol may be supported in the future, but they must be a security one.\n* Custom CA. Allowed to use self signed certificate.\n* MySQL and PostgreSQL integration for user management, which means you can just insert/update database to manage large scale of users programmatically, without modifying config file.\n\nMTop doesn't and also will not provide below features:\n\n* GeoIP detection and forwarding based on IP or domain.\n* Complex encryption. MTop's safety depends on transport protocol.\n* UDP forwarding.\n\n## MTop Protocol\n\nThe initial handshake consists of the following:\n\n1. Client connects and sends a authentication message, which includes client's username \u0026 password and the target domain/ip.\n2. Server verifys client's username \u0026 password.\n   1. If it's valid, try to connect to target domain/ip. When connection established, responses client with a success message. When connection establishment fails, responses client with a failure message.\n   2. If it's invalid, responses client with a forbidden message.\n3. Several messages may now pass between the client and the server.\n\n### Client authentication message\n\n|            | VER | METHOD | USERNAME | PASSWORD | ADDRESS  |\n| ---------- | --- | ------ | -------- | -------- | -------- |\n| Byte count | 1   | 1      | VARIABLE | VARIABLE | VARIABLE |\n\n* **VER**\n  MTop protocol version(0x1).\n\n* **METHOD**\n  Request method, only one method is supported now.\n  * CONNECT(0x1)\n  \n* **USERNAME** \u0026 **PASSWORD**\n  \n    |            | LEN | TEXT |\n    | ---------- | --- | ---- |\n    | Byte count | 1   | LEN  |\n\n    1 byte of name length followed by 1–255 bytes for the text.\n\n* **ADDRESS**\n\n    |            | TYPE | ADDR     |\n    | ---------- | ---- | -------- |\n    | Byte count | 1    | variable |\n\n    * *TYPE*\n        type of the address. One of:\n\n            0x01: IPv4 address\n            0x03: Domain name\n            0x04: IPv6 address\n\n    * *ADDR*\n        the address data that follows. Depending on type:\n\n            4 bytes for IPv4 address\n            1 byte of name length followed by 1–255 bytes for the domain name\n            16 bytes for IPv6 address\n\n### Server response message\n\n|            | VER | STATUS |\n| ---------- | --- | ------ |\n| Byte count | 1   | 1      |\n\n* **VER**\n  \n  MTop protocol version(0x1).\n\n* **STATUS**\n  \n  Response status code.\n\n        0x0 Succcess\n        0x1 Version not supported.\n        0x2 Auth failure\n        0x3 Connection failure.(Connecting to remote failure)\n   \n  \n  In practise, the server will not response any message except *Success*, they just close the connection.\n\n\n## Dataflow\n\n```\n+-----------------+                    +--------------------+                                 +----------------+\n|  Application    |    HTTP/SOCKS5     |  Climber           |    MTOP Tunnel(over TLS/QUIC)   |  MTop Server   |\n|  (Browser, etc) |  \u003c--------------\u003e  |  (Running locally) |  \u003c----------------------------\u003e |  (Remote)      |\n+-----------------+                    +--------------------+                                 +----------------+\n```\n\n## Generate self-signed certificate\n\nReplace example.com to your domain name or use IP:127.0.0.1 for testing.\n    \n```shell\nopenssl genrsa -out ca.key 2048\n```\n\n```shell\nopenssl req -new -x509 -days 365 -key ca.key -subj \"/C=CN/ST=GD/L=SZ/O=Acme, Inc./CN=Acme Root CA\" -out ca.crt\n```\n\n```shell\nopenssl req -newkey rsa:2048 -nodes -keyout server.key -subj \"/C=CN/ST=GD/L=SZ/O=Acme, Inc./CN=*.example.com\" -out server.csr\n```\n\n```shell\nopenssl x509 -req -extfile \u003c(printf \"subjectAltName=DNS:example.com,DNS:www.example.com\") -days 365 -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt\n```\n\n## Make \u0026 Install\n\n### Install MTop\n    \n* install mtop to /usr/local/\n  \n  ```shell\n  make install-mtop\n  ```\n   \n* install mtop to /custom/folder/\n\n  ```shell\n  PREFIX=/custom/folder/ make install-mtop\n  ```\n\n* install mtop systemd script\n\n  ```shell\n  make install-mtop-systemd\n  ```\n\n### Install Climber\n\n*climber is the client for mtop service.*\n\n* install climber to /usr/local/\n  \n  ```shell\n  make install-climber\n  ```\n   \n* install climber to /custom/folder/\n\n  ```shell\n  PREFIX=/custom/folder/ make install-climber\n  ```\n\n* install climber systemd script\n\n  ```shell\n  make install-climber-systemd\n  ```\n\nAfter installing, you'll have to modify their config files to make them work.\n\n\n### MTop URL\n\n```text\nmtop://user:password@example.com:443/quic?proto=mtop-example\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwikylyu%2Fmtop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwikylyu%2Fmtop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwikylyu%2Fmtop/lists"}