Skip to content

Commit

Permalink
v1.13.0 release
Browse files Browse the repository at this point in the history
1. Add "mieru import config" and "mieru export config" command to share config as URL.
2. Fix more debug logging errors.
3. Add a document about environment variables.
4. Update dependency versions.
  • Loading branch information
enfein committed Apr 1, 2023
1 parent 8927a93 commit 3846ac7
Show file tree
Hide file tree
Showing 73 changed files with 3,030 additions and 316 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19.5
go-version: 1.20.1
- name: Run go vet
run: make vet
- name: Build binaries
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/speed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19.5
go-version: 1.20.1
- name: Build test binaries
run: make test-binary
- name: Run speed test
Expand Down
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="1.12.0"
VERSION="1.13.0"

# Build binaries and installation packages.
.PHONY: build
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Build Status](https://github.com/enfein/mieru/actions/workflows/ci.yaml/badge.svg)](https://github.com/enfein/mieru/actions/workflows/ci.yaml)
[![Releases](https://img.shields.io/github/release/enfein/mieru/all.svg?style=flat)](https://github.com/enfein/mieru/releases)
[![Downloads](https://img.shields.io/github/downloads/enfein/mieru/total.svg?style=flat)](https://github.com/enfein/mieru/releases)
[![LICENSE](https://img.shields.io/github/license/enfein/mieru.svg?style=flat)](https://github.com/enfein/mieru/blob/main/LICENSE)

[中文文档](https://github.com/enfein/mieru/blob/main/README.zh_CN.md)
Expand Down
1 change: 1 addition & 0 deletions README.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Build Status](https://github.com/enfein/mieru/actions/workflows/ci.yaml/badge.svg)](https://github.com/enfein/mieru/actions/workflows/ci.yaml)
[![Releases](https://img.shields.io/github/release/enfein/mieru/all.svg?style=flat)](https://github.com/enfein/mieru/releases)
[![Downloads](https://img.shields.io/github/downloads/enfein/mieru/total.svg?style=flat)](https://github.com/enfein/mieru/releases)
[![LICENSE](https://img.shields.io/github/license/enfein/mieru.svg?style=flat)](https://github.com/enfein/mieru/blob/main/LICENSE)

mieru【見える】是一款安全的、无流量特征、难以主动探测的,基于 TCP 或 UDP 协议的 socks5 / HTTP / HTTPS 网络代理软件。
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: 1.12.0
Version: 1.13.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: 1.12.0
Version: 1.13.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: 1.12.0
Version: 1.13.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: 1.12.0
Version: 1.13.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: 1.12.0
Version: 1.13.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: 1.12.0
Version: 1.13.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: 1.12.0
Version: 1.13.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: 1.12.0
Version: 1.13.0
Release: 1%{?dist}
Summary: Mieru proxy server
License: GPLv3+
Expand Down
11 changes: 11 additions & 0 deletions docs/operation.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,14 @@ mieru enhances server-side stealth in order to prevent GFW active probing, but i
5. Open the debug logs for both the client and server to see exactly what is happening with your network connection.

If you can't solve the problem, you can submit a GitHub issue to contact the developers.

## Environment Variables

If necessary, you can use environment variables to control the behavior of the server and the client.

- `MITA_CONFIG_JSON_FILE` loads the JSON server configuration file from this path.
- `MITA_CONFIG_FILE` loads the protocol buffer server configuration file from this path.
- `MIERU_CONFIG_JSON_FILE` loads the JSON client configuration file from this path. Typically used to run multiple client processes simultaneously.
- `MIERU_CONFIG_FILE` loads the protocol buffer client configuration file from this path.
- If `MITA_LOG_NO_TIMESTAMP` is not empty, the server log does not print timestamps. Since journald already provides timestamps, we enable this by default to avoid printing duplicate timestamps.
- If `MITA_INSECURE_UDS` is not empty, do not enforce the user and access rights to the server UNIX domain socket file `/var/run/mita.sock`. This setting can be used on systems that are very restricted (e.g., cannot create new users).
11 changes: 11 additions & 0 deletions docs/operation.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,14 @@ mieru 为了防止 GFW 主动探测,增强了服务器端的隐蔽性,但是
5. 打开客户端和服务器的调试日志,查看具体的网络连接情况。

如果未能解决问题,可以提交 GitHub Issue 联系开发者。

## 环境变量

如有必要,用户可以使用环境变量控制服务器和客户端的行为。

- `MITA_CONFIG_JSON_FILE` 从这个路径加载 JSON 格式的服务器配置文件。
- `MITA_CONFIG_FILE` 从这个路径加载 protocol buffer 格式的服务器配置文件。
- `MIERU_CONFIG_JSON_FILE` 从这个路径加载 JSON 格式的客户端配置文件。通常用于同时运行多个客户端进程。
- `MIERU_CONFIG_FILE` 从这个路径加载 protocol buffer 格式的客户端配置文件。
- `MITA_LOG_NO_TIMESTAMP` 这个值非空时,服务器日志不打印时间戳。因为 journald 已经提供了时间戳,我们默认开启这项设置,以避免打印重复的时间戳。
- `MITA_INSECURE_UDS` 这个值非空时,不强制修改服务器 UNIX domain socket 文件 `/var/run/mita.sock` 的用户和访问权限。这个设置可以用于某些非常受限(例如不能创建新用户)的系统中。
30 changes: 21 additions & 9 deletions docs/server-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,35 @@ Before installation and configuration, connect to the server via SSH and then ex
## Download mita installation package

```sh
# Debian / Ubuntu
curl -LSO https://github.com/enfein/mieru/releases/download/v1.12.0/mita_1.12.0_amd64.deb
# Debian / Ubuntu - X86_64
curl -LSO https://github.com/enfein/mieru/releases/download/v1.13.0/mita_1.13.0_amd64.deb

# Debian / Ubuntu - ARM 64
curl -LSO https://github.com/enfein/mieru/releases/download/v1.13.0/mita_1.13.0_arm64.deb

# Fedora / CentOS / Red Hat Enterprise Linux - X86_64
curl -LSO https://github.com/enfein/mieru/releases/download/v1.13.0/mita-1.13.0-1.x86_64.rpm

# Fedora / CentOS / Red Hat Enterprise Linux
curl -LSO https://github.com/enfein/mieru/releases/download/v1.12.0/mita-1.12.0-1.x86_64.rpm
# Fedora / CentOS / Red Hat Enterprise Linux - ARM 64
curl -LSO https://github.com/enfein/mieru/releases/download/v1.13.0/mita-1.13.0-1.aarch64.rpm
```

To download the installer for the ARM architecture, replace `amd64` with `arm64`, and `x86_64` with `aarch64` in the link. If the above link is blocked, please use your browser to download and install from the GitHub Releases page.
If the above link is blocked, please use your browser to download and install from the GitHub Releases page.

## Install mita package

```sh
# Debian / Ubuntu
sudo dpkg -i mita_1.12.0_amd64.deb
# Debian / Ubuntu - X86_64
sudo dpkg -i mita_1.13.0_amd64.deb

# Debian / Ubuntu - ARM 64
sudo dpkg -i mita_1.13.0_arm64.deb

# Fedora / CentOS / Red Hat Enterprise Linux - X86_64
sudo rpm -Uvh --force mita-1.13.0-1.x86_64.rpm

# Fedora / CentOS / Red Hat Enterprise Linux
sudo rpm -Uvh --force mita-1.12.0-1.x86_64.rpm
# Fedora / CentOS / Red Hat Enterprise Linux - ARM 64
sudo rpm -Uvh --force mita-1.13.0-1.aarch64.rpm
```

## Grant permissions
Expand Down
30 changes: 21 additions & 9 deletions docs/server-install.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,35 @@
## 下载 mita 安装包

```sh
# Debian / Ubuntu
curl -LSO https://github.com/enfein/mieru/releases/download/v1.12.0/mita_1.12.0_amd64.deb
# Debian / Ubuntu - X86_64
curl -LSO https://github.com/enfein/mieru/releases/download/v1.13.0/mita_1.13.0_amd64.deb

# Debian / Ubuntu - ARM 64
curl -LSO https://github.com/enfein/mieru/releases/download/v1.13.0/mita_1.13.0_arm64.deb

# Fedora / CentOS / Red Hat Enterprise Linux - X86_64
curl -LSO https://github.com/enfein/mieru/releases/download/v1.13.0/mita-1.13.0-1.x86_64.rpm

# Fedora / CentOS / Red Hat Enterprise Linux
curl -LSO https://github.com/enfein/mieru/releases/download/v1.12.0/mita-1.12.0-1.x86_64.rpm
# Fedora / CentOS / Red Hat Enterprise Linux - ARM 64
curl -LSO https://github.com/enfein/mieru/releases/download/v1.13.0/mita-1.13.0-1.aarch64.rpm
```

下载 ARM 架构的安装包,将链接中的 `amd64` 替换成 `arm64``x86_64` 替换成 `aarch64` 即可。如果上述链接被墙,请翻墙后使用浏览器从 GitHub Releases 页面下载安装。
如果上述链接被墙,请翻墙后使用浏览器从 GitHub Releases 页面下载安装。

## 安装 mita 软件包

```sh
# Debian / Ubuntu
sudo dpkg -i mita_1.12.0_amd64.deb
# Debian / Ubuntu - X86_64
sudo dpkg -i mita_1.13.0_amd64.deb

# Debian / Ubuntu - ARM 64
sudo dpkg -i mita_1.13.0_arm64.deb

# Fedora / CentOS / Red Hat Enterprise Linux - X86_64
sudo rpm -Uvh --force mita-1.13.0-1.x86_64.rpm

# Fedora / CentOS / Red Hat Enterprise Linux
sudo rpm -Uvh --force mita-1.12.0-1.x86_64.rpm
# Fedora / CentOS / Red Hat Enterprise Linux - ARM 64
sudo rpm -Uvh --force mita-1.13.0-1.aarch64.rpm
```

## 赋予当前用户操作 mita 的权限,需要重启服务器使此设置生效
Expand Down
19 changes: 8 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,16 @@ module github.com/enfein/mieru
go 1.19

require (
golang.org/x/crypto v0.6.0
golang.org/x/mobile v0.0.0-20221110043201-43a038452099
golang.org/x/net v0.6.0
golang.org/x/sys v0.5.0
google.golang.org/grpc v1.53.0
google.golang.org/protobuf v1.28.1
github.com/google/btree v1.1.2
golang.org/x/crypto v0.7.0
golang.org/x/net v0.8.0
golang.org/x/sys v0.6.0
google.golang.org/grpc v1.54.0
google.golang.org/protobuf v1.30.0
)

require (
github.com/golang/protobuf v1.5.2 // indirect
golang.org/x/mod v0.8.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/tools v0.6.0 // indirect
google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc // indirect
golang.org/x/text v0.8.0 // indirect
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
)
38 changes: 16 additions & 22 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,30 +1,24 @@
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU=
github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc=
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
golang.org/x/mobile v0.0.0-20221110043201-43a038452099 h1:aIu0lKmfdgtn2uTj7JI2oN4TUrQvgB+wzTPO23bCKt8=
golang.org/x/mobile v0.0.0-20221110043201-43a038452099/go.mod h1:aAjjkJNdrh3PMckS4B10TGS2nag27cbKR1y2BpUxsiY=
golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.6.0 h1:L4ZwwTvKW9gr0ZMS1yrHD9GZhIuVjOBBnaKH+SPQK0Q=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A=
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc h1:ijGwO+0vL2hJt5gaygqP2j6PfflOBrRot0IczKbmtio=
google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc=
google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw=
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w=
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
google.golang.org/grpc v1.54.0 h1:EhTqbhiYeixwWQtAEZAxmV9MGqcjEU2mFx52xCzNyag=
google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
3 changes: 1 addition & 2 deletions pkg/appctl/appstatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"sync/atomic"

pb "github.com/enfein/mieru/pkg/appctl/appctlpb"
"github.com/enfein/mieru/pkg/log"
)

// currentAppStatus stores the current application running status.
Expand All @@ -37,7 +36,7 @@ func GetAppStatus() pb.AppStatus {
// SetAppStatus sets the application running status.
func SetAppStatus(status pb.AppStatus) {
if status == pb.AppStatus_UNKNOWN {
log.Fatalf("can't set app status to UNKNOWN")
panic("can't set app status to UNKNOWN")
}
currentAppStatus.Store(status)
}
4 changes: 1 addition & 3 deletions pkg/appctl/apptype.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ package appctl

import (
"sync"

"github.com/enfein/mieru/pkg/log"
)

type AppType int
Expand All @@ -35,7 +33,7 @@ var appTypeOnce sync.Once
// SetAppType sets the application type. This method is only effective on the first call.
func SetAppType(t AppType) {
if t == UNKNOWN_APP {
log.Fatalf("can't set AppType to UNKNOWN")
panic("can't set AppType to UNKNOWN")
}
appTypeOnce.Do(func() {
appType = t
Expand Down
Loading

0 comments on commit 3846ac7

Please sign in to comment.