-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Fix a deadlock in network connection (bug #171, bug #173). 2. Add `mieru export config simple` command (issue #176).
- Loading branch information
Showing
17 changed files
with
202 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Package: mieru | ||
Version: 3.9.0 | ||
Version: 3.10.0 | ||
Section: net | ||
Priority: optional | ||
Architecture: amd64 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Name: mieru | ||
Version: 3.9.0 | ||
Version: 3.10.0 | ||
Release: 1%{?dist} | ||
Summary: Mieru proxy client | ||
License: GPLv3+ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Package: mieru | ||
Version: 3.9.0 | ||
Version: 3.10.0 | ||
Section: net | ||
Priority: optional | ||
Architecture: arm64 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Name: mieru | ||
Version: 3.9.0 | ||
Version: 3.10.0 | ||
Release: 1%{?dist} | ||
Summary: Mieru proxy client | ||
License: GPLv3+ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Package: mita | ||
Version: 3.9.0 | ||
Version: 3.10.0 | ||
Section: net | ||
Priority: optional | ||
Architecture: amd64 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Name: mita | ||
Version: 3.9.0 | ||
Version: 3.10.0 | ||
Release: 1%{?dist} | ||
Summary: Mieru proxy server | ||
License: GPLv3+ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Package: mita | ||
Version: 3.9.0 | ||
Version: 3.10.0 | ||
Section: net | ||
Priority: optional | ||
Architecture: arm64 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Name: mita | ||
Version: 3.9.0 | ||
Version: 3.10.0 | ||
Release: 1%{?dist} | ||
Summary: Mieru proxy server | ||
License: GPLv3+ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -151,3 +151,86 @@ Applications can choose any user and password in the `socks5Authentication` list | |
**socks5 username and password authentication is not compatible with HTTP / HTTPS proxy.** Since HTTP / HTTPS proxy does not require username and password authentication, based on threat model, mieru prohibits the use of HTTP / HTTPS proxy in conjunction with socks5 username and password authentication. | ||
|
||
If you need to delete an existing HTTP / HTTPS proxy configuration, please run the `mieru delete http proxy` command. If you want to delete the socks5 username and password authentication settings, please run the `mieru delete socks5 authentication` command. | ||
|
||
## Sharing Client Settings | ||
|
||
Users can use commands `mieru export config` or `mieru export config simple` to generate URL links to share the client's configuration. These URL links can be imported into other clients using command `mieru import config <URL>`. | ||
|
||
### Standard Sharing Link | ||
|
||
Use command `mieru export config` to generate a standard sharing link. For example: | ||
|
||
``` | ||
mieru://CpsBCgdkZWZhdWx0ElgKBWJhb3ppEg1tYW5saWFucGVuZmVuGkA0MGFiYWM0MGY1OWRhNTVkYWQ2YTk5ODMxYTUxMTY1MjJmYmM4MGUzODViYjFhYjE0ZGM1MmRiMzY4ZjczOGE0Gi8SCWxvY2FsaG9zdBoFCIo0EAIaDRACGgk5OTk5LTk5OTkaBQjZMhABGgUIoCYQASD4CioCCAQSB2RlZmF1bHQYnUYguAgwBTgA | ||
``` | ||
|
||
A standard sharing link starts with `mieru://` and uses base64 encoding for the full client configuration. Users can use the standard sharing link to replicate the client configuration on a brand new device. | ||
|
||
### Simple Sharing Link | ||
|
||
Use command `mieru export config simple` to generate human-readable simple sharing links. For example: | ||
|
||
``` | ||
mierus://baozi:[email protected]?mtu=1400&multiplexing=MULTIPLEXING_HIGH&port=6666&port=9998-9999&port=6489&port=4896&profile=default&protocol=TCP&protocol=TCP&protocol=UDP&protocol=UDP | ||
``` | ||
|
||
The format of the simple sharing link is as follows: | ||
|
||
`mierus://username:password@server_address?parameter_list` | ||
|
||
A simple sharing link starts with `mierus://`, where `s` stands for `simple`. | ||
|
||
The username and password can only use uppercase letters `A-Z`, lowercase letters `a-z`, numbers `0-9`, underscores `_`, and hyphens `-`. Otherwise, a simple sharing link cannot be generated. | ||
|
||
There is only one server address in a simple sharing link. If the client's configuration contains multiple servers, multiple links will be generated. | ||
|
||
The supported parameters are: | ||
|
||
- `profile` | ||
- `mtu` | ||
- `multiplexing` | ||
- `port` | ||
- `protocol` | ||
|
||
Among them, `profile` must appear once, `mtu` and `multiplexing` can appear at most once, `port` and `protocol` can appear multiple times, and they must appear the same number of times, such that the `port` and `protocol` at the same position can be associated. Additionally, `port` can also be used to specify a port range. | ||
|
||
The simple sharing link above is equivalent to the following client configuration fragment: | ||
|
||
```json | ||
{ | ||
"profileName": "default", | ||
"user": { | ||
"name": "baozi", | ||
"password": "manlianpenfen" | ||
}, | ||
"servers": [ | ||
{ | ||
"ipAddress": "1.2.3.4", | ||
"portBindings": [ | ||
{ | ||
"port": 6666, | ||
"protocol": "TCP" | ||
}, | ||
{ | ||
"protocol": "TCP", | ||
"portRange": "9998-9999" | ||
}, | ||
{ | ||
"port": 6489, | ||
"protocol": "UDP" | ||
}, | ||
{ | ||
"port": 4896, | ||
"protocol": "UDP" | ||
} | ||
] | ||
} | ||
], | ||
"mtu": 1400, | ||
"multiplexing": { | ||
"level": "MULTIPLEXING_HIGH" | ||
} | ||
} | ||
``` | ||
|
||
Note: a simple sharing link does not contain necessary client configurations such as `socks5Port`. Therefore, importing a simple sharing link on a brand new device will fail. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -151,3 +151,86 @@ mieru 不使用 socks5 用户名和密码进行身份验证。 | |
**socks5 用户名和密码验证与 HTTP / HTTPS 代理不兼容。** 因为 HTTP / HTTPS 代理不需要用户名和密码验证,根据威胁模型,mieru 禁止在使用 socks5 用户名和密码验证的同时使用 HTTP / HTTPS 代理。 | ||
|
||
如果需要删除已有的 HTTP / HTTPS 代理配置,请运行 `mieru delete http proxy` 指令。如果想要删除 socks5 用户名和密码验证的设置,请运行 `mieru delete socks5 authentication` 指令。 | ||
|
||
## 分享客户端的设置 | ||
|
||
用户可以使用 `mieru export config` 或者 `mieru export config simple` 指令生成 URL 链接,来分享客户端的配置。这些 URL 链接可以使用 `mieru import config <URL>` 指令导入至其他客户端。 | ||
|
||
### 标准分享链接 | ||
|
||
使用指令 `mieru export config` 生成一个标准分享链接。例如: | ||
|
||
``` | ||
mieru://CpsBCgdkZWZhdWx0ElgKBWJhb3ppEg1tYW5saWFucGVuZmVuGkA0MGFiYWM0MGY1OWRhNTVkYWQ2YTk5ODMxYTUxMTY1MjJmYmM4MGUzODViYjFhYjE0ZGM1MmRiMzY4ZjczOGE0Gi8SCWxvY2FsaG9zdBoFCIo0EAIaDRACGgk5OTk5LTk5OTkaBQjZMhABGgUIoCYQASD4CioCCAQSB2RlZmF1bHQYnUYguAgwBTgA | ||
``` | ||
|
||
标准分享链接以 `mieru://` 开始,使用 base64 编码完整的客户端配置。用户可以使用标准分享链接在一台全新的设备上复刻客户端配置。 | ||
|
||
### 简单分享链接 | ||
|
||
使用指令 `mieru export config simple` 生成人类可读的简单分享链接。例如: | ||
|
||
``` | ||
mierus://baozi:[email protected]?mtu=1400&multiplexing=MULTIPLEXING_HIGH&port=6666&port=9998-9999&port=6489&port=4896&profile=default&protocol=TCP&protocol=TCP&protocol=UDP&protocol=UDP | ||
``` | ||
|
||
简单分享链接的格式如下: | ||
|
||
`mierus://用户名:密码@服务器地址?参数列表` | ||
|
||
简单分享链接以 `mierus://` 开始,其中 `s` 表示 `simple`。 | ||
|
||
用户名和密码只能使用大写字母 `A-Z`,小写字母 `a-z`,数字 `0-9`,下划线 `_` 和横杠 `-`,否则将无法生成简单分享链接。 | ||
|
||
简单分享链接中只有一个服务器地址。如果客户端的设置含有多台服务器,则会生成多个链接。 | ||
|
||
链接中支持的参数列表如下: | ||
|
||
- `profile` | ||
- `mtu` | ||
- `multiplexing` | ||
- `port` | ||
- `protocol` | ||
|
||
其中 `profile` 必须出现一次,`mtu` 以及 `multiplexing` 最多出现一次,`port` 和 `protocol` 可以出现多次,且他们出现的次数必须相同,以便将同一位置上的 `port` 和 `protocol` 联系起来。另外 `port` 也可以用来指定一段连续的端口。 | ||
|
||
上面的简单分享链接等同于如下的客户端配置片段: | ||
|
||
```json | ||
{ | ||
"profileName": "default", | ||
"user": { | ||
"name": "baozi", | ||
"password": "manlianpenfen" | ||
}, | ||
"servers": [ | ||
{ | ||
"ipAddress": "1.2.3.4", | ||
"portBindings": [ | ||
{ | ||
"port": 6666, | ||
"protocol": "TCP" | ||
}, | ||
{ | ||
"protocol": "TCP", | ||
"portRange": "9998-9999" | ||
}, | ||
{ | ||
"port": 6489, | ||
"protocol": "UDP" | ||
}, | ||
{ | ||
"port": 4896, | ||
"protocol": "UDP" | ||
} | ||
] | ||
} | ||
], | ||
"mtu": 1400, | ||
"multiplexing": { | ||
"level": "MULTIPLEXING_HIGH" | ||
} | ||
} | ||
``` | ||
|
||
注意,简单分享链接不含有 `socks5Port` 等必要的客户端配置。因此,在全新的设备上导入简单分享链接会失败。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,5 @@ | |
package version | ||
|
||
const ( | ||
AppVersion = "3.9.0" | ||
AppVersion = "3.10.0" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters