mirror of
https://github.com/bolucat/Archive.git
synced 2025-09-26 20:21:35 +08:00
Update On Fri May 9 20:36:54 CEST 2025
This commit is contained in:
@@ -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.14.1"
|
||||
VERSION="3.15.0"
|
||||
|
||||
# Build binaries and installation packages.
|
||||
.PHONY: build
|
||||
|
@@ -1,5 +1,5 @@
|
||||
Package: mieru
|
||||
Version: 3.14.1
|
||||
Version: 3.15.0
|
||||
Section: net
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
|
@@ -1,5 +1,5 @@
|
||||
Name: mieru
|
||||
Version: 3.14.1
|
||||
Version: 3.15.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Mieru proxy client
|
||||
License: GPLv3+
|
||||
|
@@ -1,5 +1,5 @@
|
||||
Package: mieru
|
||||
Version: 3.14.1
|
||||
Version: 3.15.0
|
||||
Section: net
|
||||
Priority: optional
|
||||
Architecture: arm64
|
||||
|
@@ -1,5 +1,5 @@
|
||||
Name: mieru
|
||||
Version: 3.14.1
|
||||
Version: 3.15.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Mieru proxy client
|
||||
License: GPLv3+
|
||||
|
@@ -1,5 +1,5 @@
|
||||
Package: mita
|
||||
Version: 3.14.1
|
||||
Version: 3.15.0
|
||||
Section: net
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
|
@@ -1,5 +1,5 @@
|
||||
Name: mita
|
||||
Version: 3.14.1
|
||||
Version: 3.15.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Mieru proxy server
|
||||
License: GPLv3+
|
||||
|
@@ -1,5 +1,5 @@
|
||||
Package: mita
|
||||
Version: 3.14.1
|
||||
Version: 3.15.0
|
||||
Section: net
|
||||
Priority: optional
|
||||
Architecture: arm64
|
||||
|
@@ -1,5 +1,5 @@
|
||||
Name: mita
|
||||
Version: 3.14.1
|
||||
Version: 3.15.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Mieru proxy server
|
||||
License: GPLv3+
|
||||
|
@@ -151,12 +151,12 @@ You can run the commands `mita get users` and `mita get quotas` on the server to
|
||||
```
|
||||
$ mita get users
|
||||
User LastActive 1DayDownload 1DayUpload 30DaysDownload 30DaysUpload
|
||||
abcd 2025-04-23T01:02:03Z 19.4MiB 1.8MiB 19.4MiB 1.8MiB
|
||||
abcd 2025-04-23T01:02:03Z 938.1MiB 12.9MiB 4.0GiB 31.8MiB
|
||||
|
||||
$ mita get quotas
|
||||
User Days Limit Usage
|
||||
abcd 1 10.0GiB 21.2MiB
|
||||
abcd 10 40.0GiB 21.2MiB
|
||||
abcd 1 10.0GiB 951.1MiB
|
||||
abcd 7 40.0GiB 4.0GiB
|
||||
```
|
||||
|
||||
## Environment Variables
|
||||
|
@@ -151,12 +151,12 @@ mieru start
|
||||
```
|
||||
$ mita get users
|
||||
User LastActive 1DayDownload 1DayUpload 30DaysDownload 30DaysUpload
|
||||
abcd 2025-04-23T01:02:03Z 19.4MiB 1.8MiB 19.4MiB 1.8MiB
|
||||
abcd 2025-04-23T01:02:03Z 938.1MiB 12.9MiB 4.0GiB 31.8MiB
|
||||
|
||||
$ mita get quotas
|
||||
User Days Limit Usage
|
||||
abcd 1 10.0GiB 21.2MiB
|
||||
abcd 10 40.0GiB 21.2MiB
|
||||
abcd 1 10.0GiB 951.1MiB
|
||||
abcd 7 40.0GiB 4.0GiB
|
||||
```
|
||||
|
||||
## 环境变量
|
||||
|
@@ -2,38 +2,48 @@
|
||||
|
||||
The proxy server software mita needs to run on Linux. We provide both debian and RPM installers for installing mita on Debian / Ubuntu and Fedora / CentOS / Red Hat Enterprise Linux series distributions.
|
||||
|
||||
Before installation and configuration, connect to the server via SSH and then execute the following commands.
|
||||
## Use installation script
|
||||
|
||||
Follow the installation script and complete the server installation and configuration.
|
||||
|
||||
```sh
|
||||
curl -fSsLO https://raw.githubusercontent.com/enfein/mieru/refs/heads/main/tools/setup.py
|
||||
chmod +x setup.py
|
||||
sudo python3 setup.py
|
||||
```
|
||||
|
||||
Or you can manually install and configure proxy server using the steps below.
|
||||
|
||||
## Download mita installation package
|
||||
|
||||
```sh
|
||||
# Debian / Ubuntu - X86_64
|
||||
curl -LSO https://github.com/enfein/mieru/releases/download/v3.14.1/mita_3.14.1_amd64.deb
|
||||
curl -LSO https://github.com/enfein/mieru/releases/download/v3.15.0/mita_3.15.0_amd64.deb
|
||||
|
||||
# Debian / Ubuntu - ARM 64
|
||||
curl -LSO https://github.com/enfein/mieru/releases/download/v3.14.1/mita_3.14.1_arm64.deb
|
||||
curl -LSO https://github.com/enfein/mieru/releases/download/v3.15.0/mita_3.15.0_arm64.deb
|
||||
|
||||
# RedHat / CentOS / Rocky Linux - X86_64
|
||||
curl -LSO https://github.com/enfein/mieru/releases/download/v3.14.1/mita-3.14.1-1.x86_64.rpm
|
||||
curl -LSO https://github.com/enfein/mieru/releases/download/v3.15.0/mita-3.15.0-1.x86_64.rpm
|
||||
|
||||
# RedHat / CentOS / Rocky Linux - ARM 64
|
||||
curl -LSO https://github.com/enfein/mieru/releases/download/v3.14.1/mita-3.14.1-1.aarch64.rpm
|
||||
curl -LSO https://github.com/enfein/mieru/releases/download/v3.15.0/mita-3.15.0-1.aarch64.rpm
|
||||
```
|
||||
|
||||
## Install mita package
|
||||
|
||||
```sh
|
||||
# Debian / Ubuntu - X86_64
|
||||
sudo dpkg -i mita_3.14.1_amd64.deb
|
||||
sudo dpkg -i mita_3.15.0_amd64.deb
|
||||
|
||||
# Debian / Ubuntu - ARM 64
|
||||
sudo dpkg -i mita_3.14.1_arm64.deb
|
||||
sudo dpkg -i mita_3.15.0_arm64.deb
|
||||
|
||||
# RedHat / CentOS / Rocky Linux - X86_64
|
||||
sudo rpm -Uvh --force mita-3.14.1-1.x86_64.rpm
|
||||
sudo rpm -Uvh --force mita-3.15.0-1.x86_64.rpm
|
||||
|
||||
# RedHat / CentOS / Rocky Linux - ARM 64
|
||||
sudo rpm -Uvh --force mita-3.14.1-1.aarch64.rpm
|
||||
sudo rpm -Uvh --force mita-3.15.0-1.aarch64.rpm
|
||||
```
|
||||
|
||||
Those instructions can also be used to upgrade the version of mita software package.
|
||||
|
@@ -2,38 +2,48 @@
|
||||
|
||||
代理服务器软件 mita 需要运行在 Linux 系统中。我们提供了 debian 和 RPM 安装包,便于用户在 Debian / Ubuntu 和 Fedora / CentOS / Red Hat Enterprise Linux 系列发行版中安装 mita。
|
||||
|
||||
在安装和配置开始之前,先通过 SSH 连接到服务器,再执行下面的指令。
|
||||
## 使用安装脚本
|
||||
|
||||
遵循安装脚本并完成服务器的安装和配置。
|
||||
|
||||
```sh
|
||||
curl -fSsLO https://raw.githubusercontent.com/enfein/mieru/refs/heads/main/tools/setup.py
|
||||
chmod +x setup.py
|
||||
sudo python3 setup.py
|
||||
```
|
||||
|
||||
或者,你也可以使用以下步骤手动安装并配置代理服务器。
|
||||
|
||||
## 下载 mita 安装包
|
||||
|
||||
```sh
|
||||
# Debian / Ubuntu - X86_64
|
||||
curl -LSO https://github.com/enfein/mieru/releases/download/v3.14.1/mita_3.14.1_amd64.deb
|
||||
curl -LSO https://github.com/enfein/mieru/releases/download/v3.15.0/mita_3.15.0_amd64.deb
|
||||
|
||||
# Debian / Ubuntu - ARM 64
|
||||
curl -LSO https://github.com/enfein/mieru/releases/download/v3.14.1/mita_3.14.1_arm64.deb
|
||||
curl -LSO https://github.com/enfein/mieru/releases/download/v3.15.0/mita_3.15.0_arm64.deb
|
||||
|
||||
# RedHat / CentOS / Rocky Linux - X86_64
|
||||
curl -LSO https://github.com/enfein/mieru/releases/download/v3.14.1/mita-3.14.1-1.x86_64.rpm
|
||||
curl -LSO https://github.com/enfein/mieru/releases/download/v3.15.0/mita-3.15.0-1.x86_64.rpm
|
||||
|
||||
# RedHat / CentOS / Rocky Linux - ARM 64
|
||||
curl -LSO https://github.com/enfein/mieru/releases/download/v3.14.1/mita-3.14.1-1.aarch64.rpm
|
||||
curl -LSO https://github.com/enfein/mieru/releases/download/v3.15.0/mita-3.15.0-1.aarch64.rpm
|
||||
```
|
||||
|
||||
## 安装 mita 软件包
|
||||
|
||||
```sh
|
||||
# Debian / Ubuntu - X86_64
|
||||
sudo dpkg -i mita_3.14.1_amd64.deb
|
||||
sudo dpkg -i mita_3.15.0_amd64.deb
|
||||
|
||||
# Debian / Ubuntu - ARM 64
|
||||
sudo dpkg -i mita_3.14.1_arm64.deb
|
||||
sudo dpkg -i mita_3.15.0_arm64.deb
|
||||
|
||||
# RedHat / CentOS / Rocky Linux - X86_64
|
||||
sudo rpm -Uvh --force mita-3.14.1-1.x86_64.rpm
|
||||
sudo rpm -Uvh --force mita-3.15.0-1.x86_64.rpm
|
||||
|
||||
# RedHat / CentOS / Rocky Linux - ARM 64
|
||||
sudo rpm -Uvh --force mita-3.14.1-1.aarch64.rpm
|
||||
sudo rpm -Uvh --force mita-3.15.0-1.aarch64.rpm
|
||||
```
|
||||
|
||||
上述指令也可以用来升级 mita 软件包的版本。
|
||||
|
@@ -16,5 +16,5 @@
|
||||
package version
|
||||
|
||||
const (
|
||||
AppVersion = "3.14.1"
|
||||
AppVersion = "3.15.0"
|
||||
)
|
||||
|
@@ -1,42 +0,0 @@
|
||||
# Copyright (C) 2025 mieru authors
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Assume this file is executed with `docker build -f` from the root dir of mieru project.
|
||||
|
||||
FROM ubuntu:24.04
|
||||
|
||||
WORKDIR /test
|
||||
|
||||
# Copy binaries, data and test script into the container.
|
||||
COPY sing-box mita httpserver sockshttpclient socksudpclient udpserver \
|
||||
test/deploy/singbox/singbox-config.json \
|
||||
test/deploy/singbox/server_tcp.json \
|
||||
test/deploy/singbox/libtest.sh \
|
||||
test/deploy/singbox/test_tcp.sh \
|
||||
test/deploy/singbox/test.sh /test/
|
||||
|
||||
# Create mita user and server config directory.
|
||||
RUN /usr/sbin/useradd --no-create-home --user-group mita && \
|
||||
mkdir -p /etc/mita && \
|
||||
chown -R mita:mita /etc/mita && \
|
||||
chmod 775 /etc/mita && \
|
||||
mkdir -p /var/lib/mita && \
|
||||
chown -R mita:mita /var/lib/mita && \
|
||||
chmod 775 /var/lib/mita && \
|
||||
mkdir -p /var/run/mita && \
|
||||
chown -R mita:mita /var/run/mita && \
|
||||
chmod 775 /var/run/mita
|
||||
|
||||
CMD ["/test/test.sh"]
|
@@ -1,29 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (C) 2025 mieru authors
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
function print_mieru_server_thread_dump() {
|
||||
echo "========== BEGIN OF MIERU SERVER THREAD DUMP =========="
|
||||
./mita get thread-dump
|
||||
echo "========== END OF MIERU SERVER THREAD DUMP =========="
|
||||
}
|
||||
|
||||
function print_mieru_server_metrics() {
|
||||
echo "========== BEGIN OF MIERU SERVER METRICS =========="
|
||||
./mita get metrics
|
||||
./mita get memory-statistics
|
||||
echo "========== END OF MIERU SERVER METRICS =========="
|
||||
}
|
@@ -1,30 +0,0 @@
|
||||
{
|
||||
"portBindings": [
|
||||
{
|
||||
"portRange": "8964-8965",
|
||||
"protocol": "TCP"
|
||||
},
|
||||
{
|
||||
"port": 9648,
|
||||
"protocol": "TCP"
|
||||
},
|
||||
{
|
||||
"port": 6489,
|
||||
"protocol": "TCP"
|
||||
},
|
||||
{
|
||||
"port": 4896,
|
||||
"protocol": "TCP"
|
||||
}
|
||||
],
|
||||
"users": [
|
||||
{
|
||||
"name": "baozi",
|
||||
"password": "manlianpenfen"
|
||||
}
|
||||
],
|
||||
"advancedSettings": {
|
||||
"allowLocalDestination": true
|
||||
},
|
||||
"loggingLevel": "INFO"
|
||||
}
|
@@ -1,33 +0,0 @@
|
||||
{
|
||||
"inbounds": [
|
||||
{
|
||||
"type": "mixed",
|
||||
"tag": "mixed-in",
|
||||
"listen": "0.0.0.0",
|
||||
"listen_port": 1080
|
||||
}
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
"type": "mieru",
|
||||
"tag": "mieru-out",
|
||||
"server": "127.0.0.1",
|
||||
"server_port": 8964,
|
||||
"transport": "TCP",
|
||||
"username": "baozi",
|
||||
"password": "manlianpenfen"
|
||||
}
|
||||
],
|
||||
"route": {
|
||||
"rules": [
|
||||
{
|
||||
"inbound": ["mixed-in"],
|
||||
"action": "route",
|
||||
"outbound": "mieru-out"
|
||||
}
|
||||
]
|
||||
},
|
||||
"log": {
|
||||
"level": "warn"
|
||||
}
|
||||
}
|
@@ -1,45 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (C) 2025 mieru authors
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Make sure this script has executable permission:
|
||||
# git update-index --chmod=+x <file>
|
||||
|
||||
set -e
|
||||
|
||||
# Load test library.
|
||||
source ./libtest.sh
|
||||
|
||||
# Start http server.
|
||||
./httpserver &
|
||||
sleep 2
|
||||
|
||||
# Start UDP server.
|
||||
./udpserver -port=9090 &
|
||||
sleep 1
|
||||
|
||||
# Start mieru server daemon.
|
||||
./mita run &
|
||||
sleep 1
|
||||
|
||||
# Run TCP test.
|
||||
echo "========== BEGIN OF TCP TEST =========="
|
||||
./test_tcp.sh
|
||||
echo "========== END OF TCP TEST =========="
|
||||
|
||||
echo "Test is successful."
|
||||
sleep 1
|
||||
exit 0
|
@@ -1,99 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (C) 2025 mieru authors
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Make sure this script has executable permission:
|
||||
# git update-index --chmod=+x <file>
|
||||
|
||||
# Load test library.
|
||||
source ./libtest.sh
|
||||
|
||||
# Update mieru server with TCP config.
|
||||
./mita apply config server_tcp.json
|
||||
if [[ "$?" -ne 0 ]]; then
|
||||
echo "command 'mita apply config server_tcp.json' failed"
|
||||
exit 1
|
||||
fi
|
||||
echo "mieru server config:"
|
||||
./mita describe config
|
||||
|
||||
# Start mieru server proxy.
|
||||
./mita start
|
||||
if [[ "$?" -ne 0 ]]; then
|
||||
echo "command 'mita start' failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Start sing-box.
|
||||
./sing-box run -c singbox-config.json &
|
||||
sleep 1
|
||||
|
||||
# Start testing.
|
||||
sleep 2
|
||||
echo ">>> socks5 - new connections - TCP <<<"
|
||||
./sockshttpclient -dst_host=127.0.0.1 -dst_port=8080 \
|
||||
-local_proxy_host=127.0.0.1 -local_proxy_port=1080 \
|
||||
-test_case=new_conn -num_request=3000
|
||||
if [ "$?" -ne "0" ]; then
|
||||
print_mieru_server_thread_dump
|
||||
echo "TCP - test socks5 new_conn failed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
echo ">>> http - new connections - TCP <<<"
|
||||
./sockshttpclient -proxy_mode=http -dst_host=127.0.0.1 -dst_port=8080 \
|
||||
-local_http_host=127.0.0.1 -local_http_port=1080 \
|
||||
-test_case=new_conn -num_request=1000
|
||||
if [ "$?" -ne "0" ]; then
|
||||
print_mieru_server_thread_dump
|
||||
echo "TCP - test HTTP new_conn failed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
echo ">>> socks5 - reuse one connection - TCP <<<"
|
||||
./sockshttpclient -dst_host=127.0.0.1 -dst_port=8080 \
|
||||
-local_proxy_host=127.0.0.1 -local_proxy_port=1080 \
|
||||
-test_case=reuse_conn -test_time_sec=30
|
||||
if [ "$?" -ne "0" ]; then
|
||||
print_mieru_server_thread_dump
|
||||
echo "TCP - test socks5 reuse_conn failed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
echo ">>> socks5 UDP associate - TCP <<<"
|
||||
./socksudpclient -dst_host=127.0.0.1 -dst_port=9090 \
|
||||
-local_proxy_host=127.0.0.1 -local_proxy_port=1080 \
|
||||
-interval_ms=10 -num_request=100 -num_conn=60
|
||||
if [ "$?" -ne "0" ]; then
|
||||
print_mieru_server_thread_dump
|
||||
echo "TCP - test socks5 udp_associate failed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Print metrics and memory statistics.
|
||||
print_mieru_server_metrics
|
||||
sleep 1
|
||||
|
||||
# Stop mieru server proxy.
|
||||
./mita stop
|
||||
if [[ "$?" -ne 0 ]]; then
|
||||
echo "command 'mita stop' failed"
|
||||
exit 1
|
||||
fi
|
||||
sleep 1
|
Reference in New Issue
Block a user