---
# System prepended metadata

title: Common URL Exchange Specification

---

# Common URL Exchange Specification
## Preface
There are, nowadays, many difference proxy clients used by majority people, most of them provides the ability to exchange a connection using a URL-like string.

It's easy to exchange connection configurations within one application, however, doing that among different clients could be difficult and sometimes an external converter is required to perform such task.

We are in the hope that, for each proxy type, the official should make and adopt a URL exchange specification under a common ground. That's the 


## Basic Rules
### MUSTs and MUST NOTs
1. We MUST use valid URLs for sharing and exchange.
   * bad: `trojan://we:are:fucked@some.host` is not a valid url, since colons in the password field is not correctly encoded.
3. URL MUST be majorly human-readable with adequate knowledge. 
   * good: `trojan-go://password@host:port?sni=fake-host`
   * bad: `vmess://ZnVjayB0aGUgb2xkIHYycmF5TiB2bWVzcwo=` is not human-readable with adequate knowledge.
4. URL schema names, field names and keywords MUST be case-sensitive.
   * good: `trojan-go://a@b.com?encryption=ss%3Bchacha20-ietf%3Apassword`
   * bad: `TrOJaN-gO://a@b.com?EnCrYpTIOn=Ss%3BChAcHa20-iEtF%3Apassword`
5. URL fields MUST NOT be sensitive to order of occurrence.

### SHOULD and SHOULD NOTs
1. We SHOULD reuse the sematically correct fields whenever possible.
   * good: place Trojan password in username field
   * good: place encryption method and password in username/password field

2. We SHOULD

## Glossary
### Valid URLs
We define "valid" as the ability to be correctly parsed by de facto parser implementations in mainstream programming languages.

### Human-readable with adequate knowledge
- `atob` (aka Base64, Base56 or similar) are NOT human-readable because they require too much knowledge and lookups for people to recognize.
- `encodeURIComponent` produces human-readable texts because one can understand it as long as he/she knows some code of special characters.

### 