MCPcopy Index your code
hub / github.com/3andne/restls

github.com/3andne/restls @v0.1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.1 ↗ · + Follow
115 symbols 262 edges 8 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Restls

A protocol that can disguise your proxy traffic as regular TLS traffic:

  • Disguise your proxy server as any TLS server, such as microsoft.com.
  • Developed based on utls, Disguise your proxy client as a normal browser.
  • Use the Restls-Script protocol to conceal your proxy behavior and break characteristics such as "TLS in TLS".

一个可以把你的代理流量伪装成普通TLS流量的协议:

Hide Your Proxy Traffic Behavior

"TLS in TLS" and other proxy-specific traffic behaviors can be used to identify TLS-based protocols. A typical "TLS in TLS" connection is shown in the following diagram:

"TLS in TLS"等代理特有流量行为可以被用来识别基于TLS的协议,一个典型的"TLS in TLS"连接如图所示:

tls-in-tls

Restls disrupts these obvious proxy behavior characteristics through the use of "restls-scripts". The following diagram shows Restls traffic disguised using restls-scripts:

Restls通过「剧本」机制来破坏这些明显的代理行为特征,下图为使用「剧本」伪装后的Restls流量:

restls-script

If you want to learn more about how restls-scripts work and how to design your own, please refer to: Restls-Script: Hide Your Proxy Traffic Behavior

如果你想了解更多关于「剧本」是如何运作的,以及如何设计自己的「剧本」,请参考:Restls-Script: 隐藏你的代理行为

Usage

Download the latest release

Or build it from source:

cargo build --release

Basic usage:

USAGE:
    restls --forward-to <forward-to> --listen <listen> --log-level <log-level> --password <password> --server-hostname <server-hostname> --script <script>

To deploy a Restls Service: 1. Start the shadowsocks server: ss-server -s 127.0.0.1 -p 8888 -k [YOUR_SS_PASSWORD] 2. Start the Restls server: To parrot a TLS 1.3 server: restls -s "www.microsoft.com" -l "0.0.0.0:443" -p [YOUR_RESTLS_PASSWORD] -f "127.0.0.1:8888" --script "200?100,400?100,1200?200<1,1100~300,1000~100<1,2500~500,1300~50,1300~50,100~1200" Or to parrot a TLS 1.2 server: restls -s "vscode.dev" -l "0.0.0.0:443" -p [YOUR_RESTLS_PASSWORD] -f "127.0.0.1:8888" --script "200?100,400?100,1200?200<1,1100~300,1000~100<1,2500~500,1300~50,1300~50,100~1200" 3. Define a restls proxy in Clash.Meta Restls fork - name: restls-tls13 type: ss server: [YOUR_SERVER_IP] port: 443 cipher: chacha20-ietf-poly1305 password: [YOUR_SS_PASSWORD] plugin: restls plugin-opts: host: "www.microsoft.com" # Must be a TLS 1.3 server password: [YOUR_RESTLS_PASSWORD] version-hint: "tls13" client-id: chrome # One of: chrome, ios, firefox or safari - name: restls-tls12 type: ss server: [YOUR_SERVER_IP] port: 443 cipher: chacha20-ietf-poly1305 password: [YOUR_SS_PASSWORD] plugin: restls plugin-opts: host: "vscode.dev" # Must be a TLS 1.2 server password: [YOUR_RESTLS_PASSWORD] version-hint: "tls12" client-id: firefox # One of: chrome, ios, firefox or safari

Extension points exported contracts — how you extend this code

CheckedAdvance (Interface)
(no doc) [1 implementers]
src/utils.rs

Core symbols most depended-on inside this repo

len
called by 30
src/utils.rs
u16_length_prefixed
called by 8
src/utils.rs
next_record
called by 6
src/utils.rs
has_next
called by 6
src/utils.rs
peek_record_type
called by 5
src/utils.rs
restls_hmac
called by 5
src/restls.rs
as_bytes
called by 5
src/args.rs
reset
called by 4
src/utils.rs

Shape

Method 78
Function 20
Class 12
Enum 4
Interface 1

Languages

Rust100%

Modules by API surface

src/utils.rs48 symbols
src/restls.rs45 symbols
src/args.rs9 symbols
src/client_hello.rs5 symbols
src/server_hello.rs4 symbols
src/client_key_exchange.rs2 symbols
src/main.rs1 symbols
src/common.rs1 symbols

For agents

$ claude mcp add restls \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page