Skip to content

Commit

Permalink
v3.11.0 release
Browse files Browse the repository at this point in the history
1. Reduce network latency on Android platform.
2. Add DNS policy for proxy server in dual-stack networks (issue #190).
3. Add "mieru describe build" and "mita describe build" commands.
4. Update dependency versions.
  • Loading branch information
enfein committed Jan 10, 2025
1 parent 8a75136 commit f43ff83
Show file tree
Hide file tree
Showing 23 changed files with 137 additions and 133 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ PROJECT_NAME=$(shell basename "${ROOT}")
# - pkg/version/current.go
#
# Use `tools/bump_version.sh` script to change all those files at one shot.
VERSION="3.10.0"
VERSION="3.11.0"

# Build binaries and installation packages.
.PHONY: build
Expand Down
2 changes: 1 addition & 1 deletion build/package/mieru/amd64/debian/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: mieru
Version: 3.10.0
Version: 3.11.0
Section: net
Priority: optional
Architecture: amd64
Expand Down
2 changes: 1 addition & 1 deletion build/package/mieru/amd64/rpm/mieru.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: mieru
Version: 3.10.0
Version: 3.11.0
Release: 1%{?dist}
Summary: Mieru proxy client
License: GPLv3+
Expand Down
2 changes: 1 addition & 1 deletion build/package/mieru/arm64/debian/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: mieru
Version: 3.10.0
Version: 3.11.0
Section: net
Priority: optional
Architecture: arm64
Expand Down
2 changes: 1 addition & 1 deletion build/package/mieru/arm64/rpm/mieru.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: mieru
Version: 3.10.0
Version: 3.11.0
Release: 1%{?dist}
Summary: Mieru proxy client
License: GPLv3+
Expand Down
2 changes: 1 addition & 1 deletion build/package/mita/amd64/debian/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: mita
Version: 3.10.0
Version: 3.11.0
Section: net
Priority: optional
Architecture: amd64
Expand Down
2 changes: 1 addition & 1 deletion build/package/mita/amd64/rpm/mita.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: mita
Version: 3.10.0
Version: 3.11.0
Release: 1%{?dist}
Summary: Mieru proxy server
License: GPLv3+
Expand Down
2 changes: 1 addition & 1 deletion build/package/mita/arm64/debian/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: mita
Version: 3.10.0
Version: 3.11.0
Section: net
Priority: optional
Architecture: arm64
Expand Down
2 changes: 1 addition & 1 deletion build/package/mita/arm64/rpm/mita.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: mita
Version: 3.10.0
Version: 3.11.0
Release: 1%{?dist}
Summary: Mieru proxy server
License: GPLv3+
Expand Down
14 changes: 8 additions & 6 deletions docs/client-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ Use can invoke command
mieru apply config <FILE>
```

to modify the proxy client settings. `<FILE>` is a JSON formatted configuration file. An example of client configuration is as follows.
to modify the proxy client settings. `<FILE>` is a JSON formatted configuration file. This configuration file does not need to specify the full proxy client settings. When you run command `mieru apply config <FILE>`, the contents of the file will be merged into any existing proxy client settings.

An example of client configuration is as follows.

```js
{
Expand Down Expand Up @@ -62,14 +64,14 @@ Please use a text editor to modify the following fields.
1. In the `profiles` -> `user` -> `name` property, fill in the username. This must be the same as the setting in the proxy server.
2. In the `profiles` -> `user` -> `password` property, fill in the password. This must be the same as the setting in the proxy server.
3. In the `profiles` -> `servers` -> `ipAddress` property, fill in the public address of the proxy server. Both IPv4 and IPv6 addresses are supported.
4. If you have registered a domain name for the proxy server, please fill in the domain name in `profiles` -> `servers` -> `domainName`. Otherwise, do not modify this property.
4. [Optional] If you have registered a domain name for the proxy server, please fill in the domain name in `profiles` -> `servers` -> `domainName`. Otherwise, do not modify this property.
5. Fill in `profiles` -> `servers` -> `portBindings` -> `port` with the TCP or UDP port number that mita is listening to. The port number must be the same as the one set in the proxy server. If you want to listen to a range of consecutive port numbers, you can also use the `portRange` property instead.
6. Specify a value between 1280 and 1400 for the `profiles` -> `mtu` property. The default value is 1400. This value can be different from the setting in the proxy server.
7. If you want to adjust the frequency of multiplexing, you can set a value for the `profiles` -> `multiplexing` -> `level` property. The values you can use here include `MULTIPLEXING_OFF`, `MULTIPLEXING_LOW`, `MULTIPLEXING_MIDDLE`, and `MULTIPLEXING_HIGH`. `MULTIPLEXING_OFF` will disable multiplexing, and the default value is `MULTIPLEXING_LOW`.
6. [Optional] Specify a value between 1280 and 1400 for the `profiles` -> `mtu` property. The default value is 1400. This value can be different from the setting in the proxy server.
7. [Optional] If you want to adjust the frequency of multiplexing, you can set a value for the `profiles` -> `multiplexing` -> `level` property. The values you can use here include `MULTIPLEXING_OFF`, `MULTIPLEXING_LOW`, `MULTIPLEXING_MIDDLE`, and `MULTIPLEXING_HIGH`. `MULTIPLEXING_OFF` will disable multiplexing, and the default value is `MULTIPLEXING_LOW`.
8. Please specify a value between 1025 and 65535 for the `rpcPort` property.
9. Please specify a value between 1025 and 65535 for the `socks5Port` property. This port cannot be the same as `rpcPort`.
10. If the client needs to provide proxy services to other devices on the LAN, set the `socks5ListenLAN` property to `true`.
11. If you want to enable HTTP / HTTPS proxy, Please specify a value between 1025 and 65535 for the `httpProxyPort` property. This port cannot be the same as `rpcPort` or `socks5Port`. If the client needs to provide HTTP / HTTPS proxy services to other devices on the LAN, set the `httpProxyListenLAN` property to `true`. If you want to disable HTTP / HTTPS proxy, please delete `httpProxyPort` and `httpProxyListenLAN` property.
10. [Optional] If the client needs to provide proxy services to other devices on the LAN, set the `socks5ListenLAN` property to `true`.
11. [Optional] If you want to enable HTTP / HTTPS proxy, Please specify a value between 1025 and 65535 for the `httpProxyPort` property. This port cannot be the same as `rpcPort` or `socks5Port`. If the client needs to provide HTTP / HTTPS proxy services to other devices on the LAN, set the `httpProxyListenLAN` property to `true`. If you want to disable HTTP / HTTPS proxy, please delete `httpProxyPort` and `httpProxyListenLAN` property.

If you have multiple proxy servers installed, or one server listening on multiple ports, you can add them all to the client settings. Each time a new connection is created, mieru will randomly select one of the servers and one of the ports. **If you are using multiple servers, make sure that each server has the mita proxy service started.**

Expand Down
14 changes: 8 additions & 6 deletions docs/client-install.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ mieru 客户端软件支持 Windows,Mac OS 和 Linux 系统。用户可以在
mieru apply config <FILE>
```

指令来修改客户端的设置,这里的 `<FILE>` 是一个 JSON 格式的配置文件。客户端配置的一个示例如下。
指令来修改客户端的设置,这里的 `<FILE>` 是一个 JSON 格式的配置文件。该配置文件不需要指定完整的客户端设置。运行指令 `mieru apply config <FILE>` 时,文件内容会合并到任何已有的客户端设置。

客户端配置的一个示例如下。

```js
{
Expand Down Expand Up @@ -62,14 +64,14 @@ mieru apply config <FILE>
1.`profiles` -> `user` -> `name` 属性中,填写用户名。此处必须与代理服务器中的设置相同。
2.`profiles` -> `user` -> `password` 属性中,填写密码。此处必须与代理服务器中的设置相同。
3.`profiles` -> `servers` -> `ipAddress` 属性中,填写代理服务器的公网地址。支持 IPv4 和 IPv6 地址。
4. 如果你为代理服务器注册了域名,请在 `profiles` -> `servers` -> `domainName` 中填写域名。否则,请勿修改这个属性。
4. 【可选】如果你为代理服务器注册了域名,请在 `profiles` -> `servers` -> `domainName` 中填写域名。否则,请勿修改这个属性。
5.`profiles` -> `servers` -> `portBindings` -> `port` 中填写 mita 监听的 TCP 或 UDP 端口号。这个端口号必须与代理服务器中的设置相同。如果想要监听连续的端口号,也可以改为使用 `portRange` 属性。
6. 请为 `profiles` -> `mtu` 属性中指定一个从 1280 到 1400 之间的值。默认值为 1400。这个值可以与代理服务器中的设置不同。
7. 如果想要调整多路复用的频率,是更多地创建新连接,还是更多地重用旧连接,可以为 `profiles` -> `multiplexing` -> `level` 属性设定一个值。这里可以使用的值包括 `MULTIPLEXING_OFF`, `MULTIPLEXING_LOW`, `MULTIPLEXING_MIDDLE`, `MULTIPLEXING_HIGH`。其中 `MULTIPLEXING_OFF` 会关闭多路复用功能。默认值为 `MULTIPLEXING_LOW`
6. 【可选】请为 `profiles` -> `mtu` 属性中指定一个从 1280 到 1400 之间的值。默认值为 1400。这个值可以与代理服务器中的设置不同。
7. 【可选】如果想要调整多路复用的频率,是更多地创建新连接,还是更多地重用旧连接,可以为 `profiles` -> `multiplexing` -> `level` 属性设定一个值。这里可以使用的值包括 `MULTIPLEXING_OFF`, `MULTIPLEXING_LOW`, `MULTIPLEXING_MIDDLE`, `MULTIPLEXING_HIGH`。其中 `MULTIPLEXING_OFF` 会关闭多路复用功能。默认值为 `MULTIPLEXING_LOW`
8. 请为 `rpcPort` 属性指定一个从 1025 到 65535 之间的数值。
9. 请为 `socks5Port` 属性指定一个从 1025 到 65535 之间的数值。该端口不能与 `rpcPort` 相同。
10. 如果客户端需要为局域网中的其他设备提供代理服务,请将 `socks5ListenLAN` 属性设置为 `true`
11. 如果要启动 HTTP / HTTPS 代理,请为 `httpProxyPort` 属性指定一个从 1025 到 65535 之间的数值。该端口不能与 `rpcPort``socks5Port` 相同。如果需要为局域网中的其他设备提供 HTTP / HTTPS 代理,请将 `httpProxyListenLAN` 属性设置为 `true`。如果不需要 HTTP / HTTPS 代理,请删除 `httpProxyPort``httpProxyListenLAN` 属性。
10. 【可选】如果客户端需要为局域网中的其他设备提供代理服务,请将 `socks5ListenLAN` 属性设置为 `true`
11. 【可选】如果要启动 HTTP / HTTPS 代理,请为 `httpProxyPort` 属性指定一个从 1025 到 65535 之间的数值。该端口不能与 `rpcPort``socks5Port` 相同。如果需要为局域网中的其他设备提供 HTTP / HTTPS 代理,请将 `httpProxyListenLAN` 属性设置为 `true`。如果不需要 HTTP / HTTPS 代理,请删除 `httpProxyPort``httpProxyListenLAN` 属性。

如果你安装了多台代理服务器,或者一台服务器监听多个端口,可以把它们都添加到客户端设置中。每次发起新的连接时,mieru 会随机选取其中的一台服务器和一个端口。**如果使用了多台服务器,请确保每一台服务器都启动了 mita 代理服务。**

Expand Down
64 changes: 32 additions & 32 deletions docs/server-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,32 @@ Before installation and configuration, connect to the server via SSH and then ex

```sh
# Debian / Ubuntu - X86_64
curl -LSO https://github.com/enfein/mieru/releases/download/v3.10.0/mita_3.10.0_amd64.deb
curl -LSO https://github.com/enfein/mieru/releases/download/v3.11.0/mita_3.11.0_amd64.deb

# Debian / Ubuntu - ARM 64
curl -LSO https://github.com/enfein/mieru/releases/download/v3.10.0/mita_3.10.0_arm64.deb
curl -LSO https://github.com/enfein/mieru/releases/download/v3.11.0/mita_3.11.0_arm64.deb

# RedHat / CentOS / Rocky Linux - X86_64
curl -LSO https://github.com/enfein/mieru/releases/download/v3.10.0/mita-3.10.0-1.x86_64.rpm
curl -LSO https://github.com/enfein/mieru/releases/download/v3.11.0/mita-3.11.0-1.x86_64.rpm

# RedHat / CentOS / Rocky Linux - ARM 64
curl -LSO https://github.com/enfein/mieru/releases/download/v3.10.0/mita-3.10.0-1.aarch64.rpm
curl -LSO https://github.com/enfein/mieru/releases/download/v3.11.0/mita-3.11.0-1.aarch64.rpm
```

## Install mita package

```sh
# Debian / Ubuntu - X86_64
sudo dpkg -i mita_3.10.0_amd64.deb
sudo dpkg -i mita_3.11.0_amd64.deb

# Debian / Ubuntu - ARM 64
sudo dpkg -i mita_3.10.0_arm64.deb
sudo dpkg -i mita_3.11.0_arm64.deb

# RedHat / CentOS / Rocky Linux - X86_64
sudo rpm -Uvh --force mita-3.10.0-1.x86_64.rpm
sudo rpm -Uvh --force mita-3.11.0-1.x86_64.rpm

# RedHat / CentOS / Rocky Linux - ARM 64
sudo rpm -Uvh --force mita-3.10.0-1.aarch64.rpm
sudo rpm -Uvh --force mita-3.11.0-1.aarch64.rpm
```

Those instructions can also be used to upgrade the version of mita software package.
Expand Down Expand Up @@ -73,7 +73,9 @@ Users should call
mita apply config <FILE>
```

to modify the proxy server settings. `<FILE>` is a JSON formatted configuration file. Below is an example of the server configuration file.
to modify the proxy server settings. `<FILE>` is a JSON formatted configuration file. This configuration file does not need to specify the full proxy server settings. When you run command `mita apply config <FILE>`, the contents of the file will be merged into any existing proxy server settings.

Below is an example of the server configuration file.

```js
{
Expand Down Expand Up @@ -106,7 +108,7 @@ to modify the proxy server settings. `<FILE>` is a JSON formatted configuration
2. The `portBindings` -> `protocol` property can be set to `TCP` or `UDP`.
3. Fill in the `users` -> `name` property with the user name.
4. Fill in the `users` -> `password` property with the user's password.
5. The `mtu` property is the maximum transport layer payload size when using the UDP proxy protocol. The default value is 1400. The minimum value is 1280.
5. [Optional] The `mtu` property is the maximum transport layer payload size when using the UDP proxy protocol. The default value is 1400. The minimum value is 1280.

In addition to this, mita can listen to several different ports. We recommend using multiple ports in both server and client configurations.

Expand Down Expand Up @@ -182,28 +184,6 @@ Below is an example to configure a proxy chain.

```js
{
"portBindings": [
{
"portRange": "2012-2022",
"protocol": "TCP"
},
{
"port": 2027,
"protocol": "TCP"
}
],
"users": [
{
"name": "ducaiguozei",
"password": "xijinping"
},
{
"name": "meiyougongchandang",
"password": "caiyouxinzhongguo"
}
],
"loggingLevel": "INFO",
"mtu": 1400,
"egress": {
"proxies": [
{
Expand Down Expand Up @@ -242,6 +222,26 @@ Tor browser -> mieru client -> GFW -> mita server -> Tor network -> target websi

For information on how to configure nested proxy on a Tor browser, please refer to the [Security Guide](./security.md).

### DNS Policy in IPv4 / IPv6 Dual-Stack Network

When a proxy client requests a target website using a domain name instead of an IP address, the proxy server needs to initiate a DNS request. If the proxy server is in an IPv4 / IPv6 dual-stack network, you can adjust the DNS policy using the following configuration:

```js
{
"dns": {
"dualStack": "USE_FIRST_IP"
}
}
```

The `dns` -> `dualStack` attribute supports the following values:

1. `USE_FIRST_IP`: Always use the first IP address returned by the DNS server. This is the default policy.
2. `PREFER_IPv4`: Prefer to use the first IPv4 address returned by the DNS server. If there is no IPv4 address, use the first IPv6 address.
3. `PREFER_IPv6`: Prefer to use the first IPv6 address returned by the DNS server. If there is no IPv6 address, use the first IPv4 address.
4. `ONLY_IPv4`: Force to use the first IPv4 address returned by the DNS server. If there is no IPv4 address, the connection fails.
5. `ONLY_IPv6`: Force to use the first IPv6 address returned by the DNS server. If there is no IPv6 address, the connection fails.

### Limiting User Traffic

We can use the `users` -> `quotas` property to limit the amount of traffic a user is allowed to use. For example, if you want user "ducaiguozei" to use no more than 1 GB of traffic within 1 day, and no more than 10 GB within 30 days, you can apply the following settings.
Expand Down
Loading

0 comments on commit f43ff83

Please sign in to comment.