Git Product home page Git Product logo

mieru's Issues

请问是否考虑增加redir功能?

我主要需求用于openwrt上,但目前好像不支持redir模式吧?
ss和trojan基本很难用了,用了几个月的naive,但是很奇怪在我的op上经常会断流,过几天就得重启进程,一直无解。
sagernet安卓端可以使用,比naive速度稍慢。但感觉挺稳定,想在op上用。
没有技术,只能做个伸手党,感谢作者!

unknown field portBindings

root@article:/tmp# mieru apply config config.json
protojson.Unmarshal() failed: proto: (line 2:3): unknown field "portBindings"

=== config.json ===

{
  "portBindings": [
    {
      "port": 10600,
      "protocol": "TCP"
    },
    {
      "port": 10699,
      "protocol": "TCP"
    }
  ],
  "users": [
    {
      "name": "222",
      "password": "111"
    },
    {
      "name": "111",
      "password": "2222"
    }
  ],
  "loggingLevel": "INFO",
  "mtu": 1400
}

=== mieru version ===
1.7.0
1.6.1

=== system infomation ===
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

[discuss] how can integrity be tampered, a case study

Below is excerpt from log.

$ grep dedup persist.log
2022/05/30 10:15:04 min.go:1335: dedup3 modified b[0] 48 236 [255 4 207 89 187 163 0 59 0 59 0 59 0 136 0 136 0 136]
2022/05/30 10:15:22 min.go:1335: dedup3 modified b[0] 48 232 [255 4 207 146 183 163 1 6 1 6 1 6 0 191 0 191 0 191]
2022/05/30 10:59:50 min.go:1335: dedup3 modified b[0] 48 234 [255 4 207 233 185 163 17 149 17 149 17 149 0 28 0 28 0 28]
2022/05/30 11:01:24 min.go:1335: dedup3 modified b[0] 48 234 [255 4 207 29 185 163 1 127 1 127 1 127 0 75 0 75 0 75]
2022/05/30 11:12:55 min.go:1335: dedup3 modified b[0] 239 186 [122 51 139 82 69 144 215 87 139 42 101 66 181 132 15 234 86 218]
2022/05/30 11:16:10 min.go:1335: dedup3 modified b[0] 113 126 [12 84 155 115 25 166 40 184 96 153 240 42 198 65 53 82 66 207]
…proxy/new 11:26 $

2022/05/30 11:16:10 min.go:1446: tunHandle read tid 12 len 42 fromid 144
2022/05/30 11:16:10 min.go:1446: tunHandle read tid 12 len 25727 fromid 41231
2022/05/30 11:16:10 min.go:1335: dedup3 modified b[0] 113 126 [12 84 155 115 25 166 40 184 96 153 240 42 198 65 53 82 66 207]
2022/05/30 11:16:10 min.go:1442: dedup3 error 1 [12 84 155 115 25 166 40 184 96 153 240 42 198 65 53 82 66 207]
2022/05/30 11:16:11 ctun.go:60: 14 1653880571 1653879578
2022/05/30 11:16:13 min.go:1446: tunHandle read tid 10 len 65 fromid 146
2022/05/30 11:16:13 min.go:1446: tunHandle read tid 10 len 3356 fromid 146

Previousely, 6 byte header is used, after encounter invalid value and reduce the possibility of bug, I thought error correction/detection code could be used, below is a naive implemenation by redundancy. below is sender code.

func dup3(b []byte) {
    b[6]  = b[2]
    b[7]  = b[3]
    b[8]  = b[2] + 71
    b[9]  = b[3] + 71
    b[10] = b[2] + 193
    b[11] = b[3] + 193
    b[12] = b[4]
    b[13] = b[5]
    b[14] = b[4] + 71
    b[15] = b[5] + 71
    b[16] = b[4] + 193
    b[17] = b[5] + 193
    b[2] = b[0] + 71
    b[3] = b[1] + 71
    b[4] = b[0] + 193
    b[5] = b[1] + 193
}

func send() {
            // ...
            SetCommonHeader3(header, a,b,c)
            dup3(data)
            dlen := shadow(data[18:])
            // ...
}

Different from common practices, a tunnel approach with ecdh handshake is used, instead of 1-1 mapping, N local <=> M tunnel <=> N remote is used.
Also, the header above has no pattern, the value is neither fixed nor among small set.
Context: there are 80 tabs open, and global mode is used, aka, the browser, aka chrome is actively working, and the tampering does not happen frequently, at least as of current time.

It currently works pretty well, the delay is quite low, and I can search google, even though all ports in my vps is technically banned, even 22/80/443/64000+, with iptable whitelist deployed. But as long the probability of successful tcp handshake is not zero, it still works.

Still, the chance of bug is not completely removed. The intention this issue is just to share ideas, in case those who want to DIY can distill usefaul infos.

Update the tampering can happen a lot at some time if the traffic goes high (on 50+ browser tabs or watching video) (only in recent days) , and the rate of success tcp dial approach zero for a short period after all tunnel being force closed due to error/RST/timeout, but switch to another port works, and later switch back works too. Also, mutiple one connection though multiple tunnel is not done, which might help here, so is use multiple port and/or ip server. Though currently It already works quite well for month.

Also posted at e1732a364fed/v2ray_simple

Mieru運行後在Windows上socks5無法使用

無法在windows上使用mieru

配置能夠正常使用,運行後也提示正常。
使用socks5(SwitchyOmega/Netch)連接後無法正常運作。
TCPING測試正常
SagerNet能夠正常使用,無論TCP還是UDP






咨询确认 - 纯ipv6的VPS搭建后,windows客户端无法连接

vps服务端为纯ipv6机器,root安装后,mita status的结果为mieru server status is "IDLE"。配置服务端json,启动后,正常为RUNNING
windows配置文件在最后,由于隐私,地址改为ipv6的字符串,以下是客户端的部分日志
确认客户端可以ping通服务端的ipv6地址
2022-05-22T03:50:19+08:00 INFO [metrics - server decryption] ServerDirectDecrypt=0 ServerFailedDirectDecrypt=0
2022-05-22T03:50:19+08:00 INFO [metrics - client decryption] ClientDirectDecrypt=16 ClientFailedDirectDecrypt=0

以下是客户端配置

{
    "profiles": [
        {
            "profileName": "default",
            "user": {
                "name": "a",
                "password": "123"
            },
            "servers": [
                {
                    "ipAddress": "ipv6",
                    "domainName": "",
                    "portBindings": [
                        {
                            "port": 10000,
                            "protocol": "TCP"
                        }
                    ]
                }
            ]
        }
    ],
    "activeProfile": "default",
    "rpcPort": 20000,
    "socks5Port": 30000,
    "loggingLevel": "INFO"
}

mieru client exit after cmd/powershell window is closed

This problem happens in windows system. Mieru client is started from cmd/powershell. When the cmd/powershell window is closed, mieru client also exits. The expectation is mieru client should not exit unless mieru stop command is executed by user.

This problem doesn't happen to Linux and Mac OS.

UDP頻繁發生阻斷現象

近三天用下來發現udp協議反應很快,未出現反應緩慢或無響應。但經常會出現端口阻斷,然後換一個端口隨即恢復正常。
阻斷基本是在瀏覽視頻時發生,阻斷時速率不超過5Mbps。

tcp協議反應較為緩慢,似乎與網絡擁塞有關。效果是經常出現加載慢或無響應一段時間後又恢復正常。但tcp從未出現阻斷現象。

這種情況會不會是udp發送大量包而導致阻斷?
(是否考慮服務端監聽端口段來讓客戶端隨機使用,當一個端口失去響應或被阻斷後由客戶端嘗試選擇段內其他端口?)

Windows环境下怎么用?

作者您好!请问mieru的windows客户端如何使用?下载下来的mieru.exe打开后就闪退,不知道应该如何运行?谢谢!

socks5 handshake might break if the client uses fragmented TCP packets

We used to assume one socks5 request from the client should be included in a single TCP packet. Although the packet is very small, this assumption is not true. For example, SagerNet/sing-box may send a single byte TCP packet, thus the server has to read sufficient number of bytes before processing the socks5 request.

error

win11 运行客户端报错
mieru client is not running: ClientLifecycleService.GetStatus() failed: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp [::1]:33561: connectex: No connection could be made because the target machine actively refused it."
这个rpc端口是做什么的?服务端配置没有rpc 为什么客户端就要配置rpc?

Tcp 不太行

用了最新的服务端,客户端是安卓,用了最新的sagernet 和mieru plug-in,都不行 现象是 www.google.com 能进 能搜索,但是一半网站打不开,www.YouTube.com 打不开,m.YouTube.com 能进但看不到影片 影片转几下菊花就黑屏了,但是YouTube app 没什么问题,只是发表不了comment 在意见区,其他问题待测

Allow user to change link layer MTU

At the moment the link layer (L2) MTU is set to 1500 bytes. We should allow user to change the MTU, due to the following reasons:

  1. MTU of 1500 bytes may not be supported by all ISP. For example, some ISP that uses PPPoE technology may only support MTU of 1492 bytes.
  2. When different MTU can be used, MTU will not become a feature to detect mieru traffic.

We should allow user to configure the MTU anywhere from 1280 bytes to 1500 bytes.

unknown field "portBindings"

mieru是最新的1.5.0,在服务端(Linux)的问题。

./mieru apply config config.json 
protojson.Unmarshal() failed: proto: (line 2:5): unknown field "portBindings"

config.json沒什么特别,就按模板改的如下。


{
    "portBindings": [
        {
            "port": PORT,
            "protocol": "TCP"
        }
    ],
    "users": [
        {
            "name": "EMAIL",
            "password": "PASSWORD"
        }
    ],
    "loggingLevel": "INFO",
    "mtu": 1400
}

mieru v2 and beyond

Recently there have been reports (issue #50, issue #53, Revolt Chat) of network block with both TCP and UDP protocols in China. It means the current mieru protocols are insufficient to provide a stable proxy services. Even though the original design of mieru has taken a plenty of lessons from shadowsocks and v2ray (vmess), new techniques have been deployed by GFW to identify proxy services. A few known weaknesses of the current protocols are listed below:

  1. A full encryption protocol has higher entropy than normal packets. This has been discussed on net4people/bbs#136.
  2. The RTT among the first a few packets have special timing characteristic. This is due to the fact that socks5 handshake is faster than dial and connect to the destination server.
  3. Some popular websites has deterministic number of connections and timestamps. This information needs to be hidden by multiplexing.

My current plan is to resolve 1 quickly in mieru v2 protocol. v2 means that it breaks backward compatibilities and you must use the same major version of the server and the client. To address 2 and 3, I have an ambitious plan that will take a long time to develop, so it will probably become mieru v3 at a certain point of time in the future.

Thank you for the support.

怎么解决/var/run/mita.sock文件不存在的问题?

hi.

root@racknerd-7b97d8:~# mita apply config mita-server_config.json
get mieru server status failed: ServerLifecycleService.GetStatus() failed: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix /var/run/mita.sock: connect: no such file or directory"
root@racknerd-7b97d8:~#

怎么解决/var/run/mita.sock文件不存在的问题?

Mieru client can't start on Win10

Hello dev, I update the mieru client to 1.8.0 from 1.6.1 on my Win10 device, but it can't start normally, the error message is:
start mieru client failed: exec: "mieru": cannot run executable found relative to current directory
It works normal on Win10 with 1.6.1, dosen't work with 1.7.0 and 1.8.0, then I tested 1.8.0 in my arm64 linux device, it works normally, here is my mieru config:

{
    "profiles": [
        {
            "profileName": "default",
            "user": {
                "name": "name",
                "password": "pass"
            },
            "servers": [
                {
                    "ipAddress": "x.x.x.x",
                    "domainName": "",
                    "portBindings": [
                        {
                            "port": 12345,
                            "protocol": "TCP"
                        }
                    ]
                }
            ],
            "mtu": 1400
        }
    ],
    "activeProfile": "default",
    "rpcPort": 1234,
    "socks5Port": 5678,
    "loggingLevel": "INFO",
    "socks5ListenLAN": false	
}

It works normal on my linux device, so my config should be ok. Is this a bug ?

cpu 100%

有时mita的cpu占用会接近100%。此时并未上传或下载。本地带宽测速能跑满,测速时mita的峰值CPU占用约50%。
日志:
░░ A start job for unit mita.service has finished successfully.
░░
░░ The job identifier is 66.
Jun 27 19:33:26 debian mita[439]: 2022-06-27T19:33:26+08:00 INFO return app status RUNNING back to RPC caller
Jun 27 19:34:05 debian mita[439]: 2022-06-27T19:34:05+08:00 INFO [metrics]
Jun 27 19:34:05 debian mita[439]: 2022-06-27T19:34:05+08:00 INFO [metrics - connections] ActiveOpens=0 CurrEstablished=9 MaxConn=17 PassiveOpens=32
Jun 27 19:34:05 debian mita[439]: 2022-06-27T19:34:05+08:00 INFO [metrics - server decryption] ServerDirectDecrypt=222 ServerFailedDirectDecrypt=0
Jun 27 19:34:05 debian mita[439]: 2022-06-27T19:34:05+08:00 INFO [metrics - client decryption] ClientDirectDecrypt=0 ClientFailedDirectDecrypt=0
Jun 27 19:34:05 debian mita[439]: 2022-06-27T19:34:05+08:00 INFO [metrics - UDP packets] InPkts=0 OutPkts=0
Jun 27 19:34:05 debian mita[439]: 2022-06-27T19:34:05+08:00 INFO [metrics - KCP segments] EarlyRetransSegs=0 FastRetransSegs=0 InSegs=0 LostSegs=0 OutOfWindowSegs=0 OutSegs=0 RepeatSegs=0 RetransSegs=0
Jun 27 19:34:05 debian mita[439]: 2022-06-27T19:34:05+08:00 INFO [metrics - UDP bytes] InBytes=0 OutBytes=0
Jun 27 19:34:05 debian mita[439]: 2022-06-27T19:34:05+08:00 INFO [metrics - KCP bytes] BytesReceived=0 BytesSent=0 PaddingSent=0
Jun 27 19:34:05 debian mita[439]: 2022-06-27T19:34:05+08:00 INFO [metrics - TCP bytes] InBytes=30744 OutBytes=72461 PaddingSent=4961
Jun 27 19:34:05 debian mita[439]: 2022-06-27T19:34:05+08:00 INFO [metrics - replay protection] ReplayKnownSession=0 ReplayNewSession=0
Jun 27 19:34:05 debian mita[439]: 2022-06-27T19:34:05+08:00 INFO [metrics - UDP errors] KCPInErrors=0 KCPReceiveErrors=0 KCPSendErrors=0 UDPInErrors=0
Jun 27 19:34:05 debian mita[439]: 2022-06-27T19:34:05+08:00 INFO [metrics - TCP errors] TCPReceiveErrors=0 TCPSendErrors=0
Jun 27 19:34:05 debian mita[439]: 2022-06-27T19:34:05+08:00 INFO [metrics - server socks5 errors] ConnectionRefused=0 DNSResolveErrors=0 HandshakeErrors=4 HostUnreachable=0 NetworkUnreachable=0 UnsupportedCommand=0
Jun 27 19:35:05 debian mita[439]: 2022-06-27T19:35:05+08:00 INFO [metrics]
Jun 27 19:35:05 debian mita[439]: 2022-06-27T19:35:05+08:00 INFO [metrics - connections] ActiveOpens=0 CurrEstablished=21 MaxConn=46 PassiveOpens=146
Jun 27 19:35:05 debian mita[439]: 2022-06-27T19:35:05+08:00 INFO [metrics - server decryption] ServerDirectDecrypt=16668 ServerFailedDirectDecrypt=0
Jun 27 19:35:05 debian mita[439]: 2022-06-27T19:35:05+08:00 INFO [metrics - client decryption] ClientDirectDecrypt=0 ClientFailedDirectDecrypt=0
Jun 27 19:35:05 debian mita[439]: 2022-06-27T19:35:05+08:00 INFO [metrics - UDP packets] InPkts=0 OutPkts=0
Jun 27 19:35:05 debian mita[439]: 2022-06-27T19:35:05+08:00 INFO [metrics - KCP segments] EarlyRetransSegs=0 FastRetransSegs=0 InSegs=0 LostSegs=0 OutOfWindowSegs=0 OutSegs=0 RepeatSegs=0 RetransSegs=0
Jun 27 19:35:05 debian mita[439]: 2022-06-27T19:35:05+08:00 INFO [metrics - UDP bytes] InBytes=0 OutBytes=0
Jun 27 19:35:05 debian mita[439]: 2022-06-27T19:35:05+08:00 INFO [metrics - KCP bytes] BytesReceived=0 BytesSent=0 PaddingSent=0
Jun 27 19:35:05 debian mita[439]: 2022-06-27T19:35:05+08:00 INFO [metrics - TCP bytes] InBytes=64717725 OutBytes=782514450 PaddingSent=4244892
Jun 27 19:35:05 debian mita[439]: 2022-06-27T19:35:05+08:00 INFO [metrics - replay protection] ReplayKnownSession=0 ReplayNewSession=0
Jun 27 19:35:05 debian mita[439]: 2022-06-27T19:35:05+08:00 INFO [metrics - UDP errors] KCPInErrors=0 KCPReceiveErrors=0 KCPSendErrors=0 UDPInErrors=0
Jun 27 19:35:05 debian mita[439]: 2022-06-27T19:35:05+08:00 INFO [metrics - TCP errors] TCPReceiveErrors=0 TCPSendErrors=6
Jun 27 19:35:05 debian mita[439]: 2022-06-27T19:35:05+08:00 INFO [metrics - server socks5 errors] ConnectionRefused=0 DNSResolveErrors=0 HandshakeErrors=14 HostUnreachable=0 NetworkUnreachable=0 UnsupportedCommand=0
Jun 27 19:36:05 debian mita[439]: 2022-06-27T19:36:05+08:00 INFO [metrics]
Jun 27 19:36:05 debian mita[439]: 2022-06-27T19:36:05+08:00 INFO [metrics - connections] ActiveOpens=0 CurrEstablished=23 MaxConn=53 PassiveOpens=285
Jun 27 19:36:05 debian mita[439]: 2022-06-27T19:36:05+08:00 INFO [metrics - server decryption] ServerDirectDecrypt=28124 ServerFailedDirectDecrypt=0
Jun 27 19:36:05 debian mita[439]: 2022-06-27T19:36:05+08:00 INFO [metrics - client decryption] ClientDirectDecrypt=0 ClientFailedDirectDecrypt=0
Jun 27 19:36:05 debian mita[439]: 2022-06-27T19:36:05+08:00 INFO [metrics - UDP packets] InPkts=0 OutPkts=0
Jun 27 19:36:05 debian mita[439]: 2022-06-27T19:36:05+08:00 INFO [metrics - KCP segments] EarlyRetransSegs=0 FastRetransSegs=0 InSegs=0 LostSegs=0 OutOfWindowSegs=0 OutSegs=0 RepeatSegs=0 RetransSegs=0
Jun 27 19:36:05 debian mita[439]: 2022-06-27T19:36:05+08:00 INFO [metrics - UDP bytes] InBytes=0 OutBytes=0
Jun 27 19:36:05 debian mita[439]: 2022-06-27T19:36:05+08:00 INFO [metrics - KCP bytes] BytesReceived=0 BytesSent=0 PaddingSent=0
Jun 27 19:36:05 debian mita[439]: 2022-06-27T19:36:05+08:00 INFO [metrics - TCP bytes] InBytes=111254269 OutBytes=783629382 PaddingSent=4265374
Jun 27 19:36:05 debian mita[439]: 2022-06-27T19:36:05+08:00 INFO [metrics - replay protection] ReplayKnownSession=0 ReplayNewSession=0
Jun 27 19:36:05 debian mita[439]: 2022-06-27T19:36:05+08:00 INFO [metrics - UDP errors] KCPInErrors=0 KCPReceiveErrors=0 KCPSendErrors=0 UDPInErrors=0
Jun 27 19:36:05 debian mita[439]: 2022-06-27T19:36:05+08:00 INFO [metrics - TCP errors] TCPReceiveErrors=14868303 TCPSendErrors=6
Jun 27 19:36:05 debian mita[439]: 2022-06-27T19:36:05+08:00 INFO [metrics - server socks5 errors] ConnectionRefused=0 DNSResolveErrors=0 HandshakeErrors=42 HostUnreachable=0 NetworkUnreachable=0 UnsupportedCommand=0

It cannot be used

I have done all the configuration correctly and it worked fine for a few hours but then it completely stopped working.

(During the few hours it worked, it did not open youtube.com)

I searched a lot for the problem but did not find it


┌─[root@id-531791]─[~]
└──╼ #cat mieru/configs/templates/server_config.jso

{
    "portBindings": [
        {
            "port": 20,
            "protocol": "TCP"
        }
    ],
    "users": [
        {
            "name": "user",
            "password": "password"
        }
    ],
    "loggingLevel": "INFO",
    "mtu": 1375
}

┌─[root@id-531791]─[~]
└──╼ #mita describe config


{
    "portBindings":  [
        {
            "port":  20,
            "protocol":  "TCP"
        }
    ],
    "users":  [
        {
            "name":  "user",
            "hashedPassword":  "bc246cd4...............4b1cf9933e"
        }
    ],
    "loggingLevel":  "INFO",
    "mtu":  1375
}


┌─[root@id-531791]─[~]
└──╼ #mita start

mieru server proxy is running

┌─[root@id-531791]─[~]
└──╼ #mita status

mieru server status is "RUNNING"

┌─[root@id-531791]─[~]
└──╼ #systemctl status mita.service

● mita.service - Mieru proxy server
     Loaded: loaded (/lib/systemd/system/mita.service; enabled; vendor preset: disabled)
     Active: active (running) since Mon 2022-07-25 22:55:46 CEST; 1h 40min ago
   Main PID: 7387 (mita)
      Tasks: 5 (limit: 2269)
     Memory: 3.4M
        CPU: 1.029s
     CGroup: /system.slice/mita.service
             └─7387 /usr/bin/mita run

Jul 26 00:35:46 id-531791 mita[7387]: 2022-07-26T00:35:46+02:00 INFO [metrics - client decryption] ClientDirectDecrypt=0 ClientFailedDirectDecrypt=0
Jul 26 00:35:46 id-531791 mita[7387]: 2022-07-26T00:35:46+02:00 INFO [metrics - UDP packets] InPkts=0 OutPkts=0
Jul 26 00:35:46 id-531791 mita[7387]: 2022-07-26T00:35:46+02:00 INFO [metrics - KCP segments] EarlyRetransSegs=0 FastRetransSegs=0 InSegs=0 LostSegs=0 OutOfWindowSegs=0 OutSegs=0 RepeatSegs=0 RetransSegs=0
Jul 26 00:35:46 id-531791 mita[7387]: 2022-07-26T00:35:46+02:00 INFO [metrics - UDP bytes] InBytes=0 OutBytes=0
Jul 26 00:35:46 id-531791 mita[7387]: 2022-07-26T00:35:46+02:00 INFO [metrics - KCP bytes] BytesReceived=0 BytesSent=0 PaddingSent=0
Jul 26 00:35:46 id-531791 mita[7387]: 2022-07-26T00:35:46+02:00 INFO [metrics - TCP bytes] InBytes=990 OutBytes=0 PaddingSent=0
Jul 26 00:35:46 id-531791 mita[7387]: 2022-07-26T00:35:46+02:00 INFO [metrics - replay protection] ReplayKnownSession=0 ReplayNewSession=0
Jul 26 00:35:46 id-531791 mita[7387]: 2022-07-26T00:35:46+02:00 INFO [metrics - UDP errors] KCPInErrors=0 KCPReceiveErrors=0 KCPSendErrors=0 UDPInErrors=0
Jul 26 00:35:46 id-531791 mita[7387]: 2022-07-26T00:35:46+02:00 INFO [metrics - TCP errors] TCPReceiveErrors=63 TCPSendErrors=0
Jul 26 00:35:46 id-531791 mita[7387]: 2022-07-26T00:35:46+02:00 INFO [metrics - server socks5 errors] ConnectionRefused=0 DNSResolveErrors=0 HandshakeErrors=63 HostUnreachable=0 NetworkUnreachable=0 UnsupportedCommand=0


┌─[root@id-531791]─[~]
└──╼ #netstat -lntup | grep " LISTEN " | grep "20"

tcp6       0      0 :::20                   :::*                    LISTEN      7387/mita           

┌─[root@id-531791]─[~]
└──╼ #firewall-cmd --zone=public --list-ports

3389/tcp 22/tcp  20/tcp


┌─[vlad@70024]─[~]
└──╼ $curl -U "<Username>:<Password>" -x <server ip>:20 httpbin.org/ip

curl: (52) Empty reply from server

socks5: curl: (97) Unable to receive initial SOCKS5 response

Comamand trigger error

curl  -x socks5h://127.0.0.1:1080 -o /dev/null http://cachefly.cachefly.net/100mb.test
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (97) Unable to receive initial SOCKS5 response.

Setup of server & client

  • both debian/amd64
  • copy install command from official doc

After install

Server:

$ mita describe config
{
    "portBindings": [
        {
            "port": 5500,
            "protocol": "TCP"
        }
    ],
    "users": [
        {
            "name": "3fMF9rOl5317HDEh",
            "hashedPassword": "c7a13224b3ff6be0235d30179735a4f0b0370a956dbcbb2c4d6cc7bce1e2622c"
        }
    ],
    "loggingLevel": "INFO",
    "mtu": 1400
}

$ systemctl status mita
● mita.service - Mieru proxy server
   Loaded: loaded (/lib/systemd/system/mita.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2022-07-13 22:34:14 EDT; 3h 41min ago
...

Client

mieru describe config
{
    "profiles": [
        {
            "profileName": "default",
            "user": {
                "name": "3fMF9rOl5317HDEh",
                "password": "0V2_1E!eRM1S0q9P",
                "hashedPassword": "c7a13224b3ff6be0235d30179735a4f0b0370a956dbcbb2c4d6cc7bce1e2622c"
            },
            "servers": [
                {
                    "ipAddress": "xx.xx.xx.49",
                    "portBindings": [
                        {
                            "port": 5500,
                            "protocol": "TCP"
                        }
                    ]
                }
            ],
            "mtu": 1400
        }
    ],
    "activeProfile": "default",
    "rpcPort": 1079,
    "socks5Port": 1080,
    "loggingLevel": "INFO"
}

$ netstat -lnpt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:1079          0.0.0.0:*               LISTEN      941/mieru
tcp6       0      0 :::1080                 :::*                    LISTEN      941/mieru

TCP mode not work?

Hello i tested mita
udp mode with unbloked internet work.
but tcp mode with blocked and unblocked internet not working!.

mieru v1.9.0 oom-kill

在路由器 (Redmi Router AX6S 256M 内存 openwrt 系统) 上运行 mieru,一开始内存占用较低,随时间逐渐增加并最终导致 oom-kill,考虑是否存在内存泄漏问题。

系统日志:

Wed Dec 14 22:37:32 2022 kern.warn kernel: [114296.480768] mieru invoked oom-killer: gfp_mask=0x100dca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO), order=0, oom_score_adj=0
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.491245] CPU: 0 PID: 2476 Comm: mieru Not tainted 5.10.138 #0
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.497329] Hardware name: Xiaomi Redmi Router AX6S (DT)
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.502717] Call trace:
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.505242]  0xffffffc01000a310
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.508460]  0xffffffc01000a4d4
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.511679]  0xffffffc0107f5b50
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.514897]  0xffffffc0107f418c
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.518115]  0xffffffc01011bf50
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.521332]  0xffffffc01011c938
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.524550]  0xffffffc01015f75c
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.527767]  0xffffffc01015fb74
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.530986]  0xffffffc010146e2c
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.534203]  0xffffffc0100167c8
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.537421]  0xffffffc010016aa4
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.540638]  0xffffffc010016c6c
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.543857]  0xffffffc0107fb154
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.547074]  0xffffffc0107fb584
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.550292]  0xffffffc0100025c8
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.553609] Mem-Info:
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.555994] active_anon:16456 inactive_anon:17931 isolated_anon:0
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.555994]  active_file:5 inactive_file:8 isolated_file:0
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.555994]  unevictable:0 dirty:0 writeback:0
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.555994]  slab_reclaimable:1998 slab_unreclaimable:6606
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.555994]  mapped:969 shmem:2768 pagetables:417 bounce:0
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.555994]  free:4645 free_pcp:0 free_cma:0
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.587724] Node 0 active_anon:65824kB inactive_anon:71724kB active_file:20kB inactive_file:32kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:3840kB dirty:0kB writeback:0kB shmem:11072kB writeback_tmp:0kB kernel_stack:1728kB all_unreclaimable? yes
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.611165] DMA free:18580kB min:16384kB low:20480kB high:24576kB reserved_highatomic:4096KB active_anon:65824kB inactive_anon:71724kB active_file:140kB inactive_file:152kB unevictable:0kB writepending:0kB present:262144kB managed:233328kB mlocked:0kB pagetables:1668kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.639481] lowmem_reserve[]: 0 0 0 0
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.643229] DMA: 499*4kB (UMEH) 93*8kB (UMEH) 14*16kB (UME) 2*32kB (UE) 2*64kB (M) 3*128kB (UM) 1*256kB (M) 1*512kB (U) 4*1024kB (ME) 3*2048kB (ME) 1*4096kB (M) = 18644kB
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.658557] 2769 total pagecache pages
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.662384] 0 pages in swap cache
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.665782] Swap cache stats: add 62488, delete 62488, find 204/10973
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.672298] Free swap  = 0kB
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.675261] Total swap = 115708kB
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.678653] 65536 pages RAM
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.681523] 0 pages HighMem/MovableOnly
Wed Dec 14 22:37:32 2022 kern.debug kernel: [114296.685440] 7204 pages reserved
Wed Dec 14 22:37:32 2022 kern.info kernel: [114296.688658] Tasks state (memory values in pages):
Wed Dec 14 22:37:32 2022 kern.info kernel: [114296.693439] [  pid  ]   uid  tgid total_vm      rss pgtables_bytes swapents oom_score_adj name
Wed Dec 14 22:37:32 2022 kern.info kernel: [114296.702150] [    925]    81   925      314       25    36864        8             0 ubusd
Wed Dec 14 22:37:32 2022 kern.info kernel: [114296.710412] [    926]     0   926      212        2    32768       11             0 askfirst
Wed Dec 14 22:37:32 2022 kern.info kernel: [114296.718933] [    961]     0   961      246        2    28672       14             0 urngd
Wed Dec 14 22:37:32 2022 kern.info kernel: [114296.727301] [   1354]   514  1354      305       17    32768       21             0 logd
Wed Dec 14 22:37:32 2022 kern.info kernel: [114296.735478] [   1408]     0  1408      553        2    36864       65             0 rpcd
Wed Dec 14 22:37:32 2022 kern.info kernel: [114296.743654] [   1645]     0  1645      262       13    32768        3             0 dropbear
Wed Dec 14 22:37:32 2022 kern.info kernel: [114296.752170] [   1755]     0  1755      644        2    36864       25             0 hostapd
Wed Dec 14 22:37:32 2022 kern.info kernel: [114296.760605] [   1756]     0  1756      644        2    32768       25             0 wpa_supplicant
Wed Dec 14 22:37:32 2022 kern.info kernel: [114296.769648] [   1778]   101  1778     1127       14    40960       19             0 wpa_supplicant
Wed Dec 14 22:37:32 2022 kern.info kernel: [114296.778691] [   1780]   101  1780     1179       41    40960       14             0 hostapd
Wed Dec 14 22:37:32 2022 kern.info kernel: [114296.787129] [   1820]     0  1820      460       17    28672       32             0 netifd
Wed Dec 14 22:37:32 2022 kern.info kernel: [114296.795479] [   1865]     0  1865      367       23    36864        9             0 odhcpd
Wed Dec 14 22:37:32 2022 kern.info kernel: [114296.803828] [   2005]     0  2005      403        2    32768       39             0 uhttpd
Wed Dec 14 22:37:32 2022 kern.info kernel: [114296.812171] [   2328]     0  2328      251       10    32768        7             0 odhcp6c
Wed Dec 14 22:37:32 2022 kern.info kernel: [114296.820607] [   2450]     0  2450      644        2    32768       27             0 ntpd
Wed Dec 14 22:37:32 2022 kern.info kernel: [114296.828781] [   2462]   123  2462      312       13    32768        2             0 ntpd
Wed Dec 14 22:37:32 2022 kern.info kernel: [114296.888416] [  11052]     0 11052      328       19    28672       18             0 pppd
Wed Dec 14 22:37:32 2022 kern.info kernel: [114296.913114] [   2472]     0  2472      104       51    32768        3             0 ipt2socks
Wed Dec 14 22:37:32 2022 kern.info kernel: [114296.921724] [   2473]     0  2473   231713    30805   593920    19566             0 mieru
Wed Dec 14 22:37:32 2022 kern.info kernel: [114296.946768] [   2703]     0  2703      644        2    36864       27             0 dnsmasq
Wed Dec 14 22:37:32 2022 kern.info kernel: [114296.955203] [   2709]   453  2709      361       32    36864        8             0 dnsmasq
Wed Dec 14 22:37:32 2022 kern.info kernel: [114296.972635] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/,task=mieru,pid=2473,uid=0
Wed Dec 14 22:37:32 2022 kern.err kernel: [114296.985108] Out of memory: Killed process 2473 (mieru) total-vm:926852kB, anon-rss:120588kB, file-rss:4kB, shmem-rss:2628kB, UID:0 pgtables:580kB oom_score_adj:0

mieru 运行日志 (DEBUG) :
20221214_0347_2473_脱敏.log

TCP not work, UDP works but very unreliable!

Internet = Yes
Mita version = 1.11.0 (compiled)
Android Client = Sagernet (Mieru Plugin 1.12.0 Latest)
Network = UDP and TCP

Complaint:
TCP = No internet at all (even with working direct internet)
UDP = Sometimes it works for some seconds (most time not working)

INFO:
Feb 18 12:40:02 xx mita[775]: INFO [metrics]
Feb 18 12:40:02 xx mita[775]: INFO [metrics - cipher - server] DirectDecrypt=7 FailedDirectDecrypt=0 FailedIterateD>
Feb 18 12:40:02 xx mita[775]: INFO [metrics - connections] ActiveOpens=0 CurrEstablished=0 MaxConn=2 PassiveOpens=2
Feb 18 12:40:02 xx mita[775]: INFO [metrics - errors] KCPInErrors=0 KCPReceiveErrors=0 KCPSendErrors=0 TCPReceiveEr>
Feb 18 12:40:02 xx mita[775]: INFO [metrics - KCP] BytesReceived=281 BytesSent=4824 FastRetransSegs=0 InSegs=10 Los>
Feb 18 12:40:02 xx mita[775]: INFO [metrics - replay] KnownSession=0 NewSession=0
Feb 18 12:40:02 xx mita[775]: INFO [metrics - socks5] ConnectionRefusedErrors=0 DNSResolveErrors=0 HandshakeErrors=>
Feb 18 12:40:02 xx mita[775]: INFO [metrics - socks5 UDP associate] InBytes=0 InPkts=0 OutBytes=0 OutPkts=0
Feb 18 12:40:02 xx mita[775]: INFO [metrics - traffic] InBytes=1225 OutBytes=80754 OutPaddingBytes=3954
Feb 18 12:40:02 xx mita[775]: INFO [metrics - user - xxxxx] InBytes=1225 OutBytes=80754

Please what could be wrong?

Netch無法透過socks5進行流量代理

系統版本信息

mita 版本:1.6.1
Server OS: Debian11
Client 版本:1.6.1
Client OS: Windows 11
socks5程序:Netch

問題

透過客戶端建立的socks5服務無法使用Netch代理連接
測試發現服務端無監聽IPV4,不知道是客戶端無法建立socks5服務還是服務端原因
測試server看到似乎自動選擇IPV6而未監聽IPV4的端口
服務端已禁用IPV6但依然無效,但客戶端透過tcping測試又確實能夠ping到監聽端口
不明白......哪裏錯了......Netch代理后上下流量完全為0

服務端配置:

{
    "portBindings": [
        {
            "port": 8998,
            "protocol": "TCP"
        }
    ],
    "users": [
        {
            "name": "XXXX",
            "password": "XXXX"
        }
    ],
    "loggingLevel": "INFO",
    "mtu": 1400
}

客戶端配置:

{
    "profiles": [
        {
            "profileName": "default",
            "user": {
                "name": "XXXX",
                "password": "XXXX"
            },
            "servers": [
                {
                    "ipAddress": "XXX.XXX.XXX.XXX",
                    "domainName": "",
                    "portBindings": [
                        {
                            "port": 8998,
                            "protocol": "TCP"
                        }
                    ]
                }
            ],
            "mtu": 1400
        }
    ],
    "activeProfile": "default",
    "rpcPort": 16657,
    "socks5Port": 1198,
    "loggingLevel": "INFO"
}

Server檢查步驟:

root@VM-8-13-debian:~# mita start
mieru server proxy is running
root@VM-8-13-debian:~# mita status
mieru server status is "RUNNING"
root@VM-8-13-debian:~# lsof -i:8998
COMMAND PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
mita    683 root    7u  IPv6  14194      0t0  TCP *:8998 (LISTEN)
root@VM-8-13-debian:~# netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1/init
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      748/sshd: /usr/sbin
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1176/exim4
tcp6       0      0 :::8998                 :::*                    LISTEN      683/mita
tcp6       0      0 :::111                  :::*                    LISTEN      1/init
tcp6       0      0 :::22                   :::*                    LISTEN      748/sshd: /usr/sbin
root@VM-8-13-debian:~#

client 運行步驟:

PS C:\Users\skyni> mieru apply config "D:\Program Files\mieru\cncos.json"
PS C:\Users\skyni> mieru stop
mieru client is stopped
PS C:\Users\skyni> mieru start
mieru client is started, listening to localhost:1198
PS C:\Users\skyni> mieru stop
mieru client is stopped
PS C:\Users\skyni> mieru start
mieru client is started, listening to localhost:1198
PS C:\Users\skyni>

client log:

2022-08-22T04:04:33+08:00 INFO mieru client RPC server is running
2022-08-22T04:04:33+08:00 INFO UDP session MTU is set to 1400
2022-08-22T04:04:33+08:00 INFO mieru client socks5 server is running
2022-08-22T04:04:33+08:00 INFO enabled metrics logging with duration 1m0s
2022-08-22T04:04:33+08:00 INFO return app status RUNNING back to RPC caller
2022-08-22T04:05:33+08:00 INFO [metrics]
2022-08-22T04:05:33+08:00 INFO [metrics - connections] ActiveOpens=3 CurrEstablished=0 MaxConn=1 PassiveOpens=0
2022-08-22T04:05:33+08:00 INFO [metrics - server decryption] ServerDirectDecrypt=0 ServerFailedDirectDecrypt=0 ServerFailedIterateDecrypt=0
2022-08-22T04:05:33+08:00 INFO [metrics - client decryption] ClientDirectDecrypt=0 ClientFailedDirectDecrypt=0
2022-08-22T04:05:33+08:00 INFO [metrics - UDP packets] InPkts=0 OutPkts=0
2022-08-22T04:05:33+08:00 INFO [metrics - KCP segments] EarlyRetransSegs=0 FastRetransSegs=0 InSegs=0 LostSegs=0 OutOfWindowSegs=0 OutSegs=0 RepeatSegs=0 RetransSegs=0
2022-08-22T04:05:33+08:00 INFO [metrics - UDP bytes] InBytes=0 OutBytes=0
2022-08-22T04:05:33+08:00 INFO [metrics - KCP bytes] BytesReceived=0 BytesSent=0 PaddingSent=0
2022-08-22T04:05:33+08:00 INFO [metrics - TCP bytes] InBytes=0 OutBytes=0 PaddingSent=0
2022-08-22T04:05:33+08:00 INFO [metrics - replay protection] ReplayKnownSession=0 ReplayNewSession=0
2022-08-22T04:05:33+08:00 INFO [metrics - UDP errors] KCPInErrors=0 KCPReceiveErrors=0 KCPSendErrors=0 UDPInErrors=0
2022-08-22T04:05:33+08:00 INFO [metrics - TCP errors] TCPReceiveErrors=3 TCPSendErrors=0
2022-08-22T04:05:33+08:00 INFO [metrics - server socks5 errors] ConnectionRefused=0 DNSResolveErrors=0 HandshakeErrors=0 HostUnreachable=0 NetworkUnreachable=0 UnsupportedCommand=0
2022-08-22T04:06:33+08:00 INFO [metrics]
2022-08-22T04:06:33+08:00 INFO [metrics - connections] ActiveOpens=3 CurrEstablished=0 MaxConn=1 PassiveOpens=0
2022-08-22T04:06:33+08:00 INFO [metrics - server decryption] ServerDirectDecrypt=0 ServerFailedDirectDecrypt=0 ServerFailedIterateDecrypt=0
2022-08-22T04:06:33+08:00 INFO [metrics - client decryption] ClientDirectDecrypt=0 ClientFailedDirectDecrypt=0
2022-08-22T04:06:33+08:00 INFO [metrics - UDP packets] InPkts=0 OutPkts=0
2022-08-22T04:06:33+08:00 INFO [metrics - KCP segments] EarlyRetransSegs=0 FastRetransSegs=0 InSegs=0 LostSegs=0 OutOfWindowSegs=0 OutSegs=0 RepeatSegs=0 RetransSegs=0
2022-08-22T04:06:33+08:00 INFO [metrics - UDP bytes] InBytes=0 OutBytes=0
2022-08-22T04:06:33+08:00 INFO [metrics - KCP bytes] BytesReceived=0 BytesSent=0 PaddingSent=0
2022-08-22T04:06:33+08:00 INFO [metrics - TCP bytes] InBytes=0 OutBytes=0 PaddingSent=0
2022-08-22T04:06:33+08:00 INFO [metrics - replay protection] ReplayKnownSession=0 ReplayNewSession=0
2022-08-22T04:06:33+08:00 INFO [metrics - UDP errors] KCPInErrors=0 KCPReceiveErrors=0 KCPSendErrors=0 UDPInErrors=0
2022-08-22T04:06:33+08:00 INFO [metrics - TCP errors] TCPReceiveErrors=3 TCPSendErrors=0
2022-08-22T04:06:33+08:00 INFO [metrics - server socks5 errors] ConnectionRefused=0 DNSResolveErrors=0 HandshakeErrors=0 HostUnreachable=0 NetworkUnreachable=0 UnsupportedCommand=0
2022-08-22T04:07:33+08:00 INFO [metrics]
2022-08-22T04:07:33+08:00 INFO [metrics - connections] ActiveOpens=18 CurrEstablished=0 MaxConn=2 PassiveOpens=0
2022-08-22T04:07:33+08:00 INFO [metrics - server decryption] ServerDirectDecrypt=0 ServerFailedDirectDecrypt=0 ServerFailedIterateDecrypt=0
2022-08-22T04:07:33+08:00 INFO [metrics - client decryption] ClientDirectDecrypt=0 ClientFailedDirectDecrypt=0
2022-08-22T04:07:33+08:00 INFO [metrics - UDP packets] InPkts=0 OutPkts=0
2022-08-22T04:07:33+08:00 INFO [metrics - KCP segments] EarlyRetransSegs=0 FastRetransSegs=0 InSegs=0 LostSegs=0 OutOfWindowSegs=0 OutSegs=0 RepeatSegs=0 RetransSegs=0
2022-08-22T04:07:33+08:00 INFO [metrics - UDP bytes] InBytes=0 OutBytes=0
2022-08-22T04:07:33+08:00 INFO [metrics - KCP bytes] BytesReceived=0 BytesSent=0 PaddingSent=0
2022-08-22T04:07:33+08:00 INFO [metrics - TCP bytes] InBytes=0 OutBytes=0 PaddingSent=0
2022-08-22T04:07:33+08:00 INFO [metrics - replay protection] ReplayKnownSession=0 ReplayNewSession=0
2022-08-22T04:07:33+08:00 INFO [metrics - UDP errors] KCPInErrors=0 KCPReceiveErrors=0 KCPSendErrors=0 UDPInErrors=0
2022-08-22T04:07:33+08:00 INFO [metrics - TCP errors] TCPReceiveErrors=18 TCPSendErrors=0
2022-08-22T04:07:33+08:00 INFO [metrics - server socks5 errors] ConnectionRefused=0 DNSResolveErrors=0 HandshakeErrors=0 HostUnreachable=0 NetworkUnreachable=0 UnsupportedCommand=0
2022-08-22T04:08:33+08:00 INFO [metrics]
2022-08-22T04:08:33+08:00 INFO [metrics - connections] ActiveOpens=36 CurrEstablished=0 MaxConn=2 PassiveOpens=0
2022-08-22T04:08:33+08:00 INFO [metrics - server decryption] ServerDirectDecrypt=0 ServerFailedDirectDecrypt=0 ServerFailedIterateDecrypt=0
2022-08-22T04:08:33+08:00 INFO [metrics - client decryption] ClientDirectDecrypt=0 ClientFailedDirectDecrypt=0
2022-08-22T04:08:33+08:00 INFO [metrics - UDP packets] InPkts=0 OutPkts=0
2022-08-22T04:08:33+08:00 INFO [metrics - KCP segments] EarlyRetransSegs=0 FastRetransSegs=0 InSegs=0 LostSegs=0 OutOfWindowSegs=0 OutSegs=0 RepeatSegs=0 RetransSegs=0
2022-08-22T04:08:33+08:00 INFO [metrics - UDP bytes] InBytes=0 OutBytes=0
2022-08-22T04:08:33+08:00 INFO [metrics - KCP bytes] BytesReceived=0 BytesSent=0 PaddingSent=0
2022-08-22T04:08:33+08:00 INFO [metrics - TCP bytes] InBytes=0 OutBytes=0 PaddingSent=0
2022-08-22T04:08:33+08:00 INFO [metrics - replay protection] ReplayKnownSession=0 ReplayNewSession=0
2022-08-22T04:08:33+08:00 INFO [metrics - UDP errors] KCPInErrors=0 KCPReceiveErrors=0 KCPSendErrors=0 UDPInErrors=0
2022-08-22T04:08:33+08:00 INFO [metrics - TCP errors] TCPReceiveErrors=36 TCPSendErrors=0
2022-08-22T04:08:33+08:00 INFO [metrics - server socks5 errors] ConnectionRefused=0 DNSResolveErrors=0 HandshakeErrors=0 HostUnreachable=0 NetworkUnreachable=0 UnsupportedCommand=0

[讨论]性能怎么样,功能方面和实现方面如何设计的。

请问,性能怎样?
1 延时低吗,尤其是打开多个浏览器窗口时。(比如用Vimium,谷歌搜索后一次打开10来个后台窗口,然后一一查看。)
2 连接数多时,服务器端性能如何?
3 对墙的动作有什么防范吗?假如被针对的话会如何?
4 后续维护的动力如何?
5 高级功能方面有考虑过吗?
6 是自用或小范围使用,还是想做大推广?预想的用户群体是什么,开发者,还是一般用户?
7 如果别人要入坑的话,理由是什么,什么地方有吸引力?

If I read the udp code, where should I begin?

I want to read the code to learn how to properly support udp mode.

I mainly interested in pure golang version, with

  • no configuration, all comes in command arguments (support ENV as default). Even wrote argparser for that.
  • only a handful files and minimize external dependency.
    to
  • fast prototyping
    Might implement config level if all lower level are more full grown.

Since I'm unfamiliar with udp & kcp, where shall I start? Which file or directory should I dive into?

客户端如何分别独立运行多个配置?

首先感谢 @enfein ,当前流行依赖web服务器伪装和CDN的技术路线实在违背我的常识。

如题,在某些场景下,需要单独使用指定服务器的线路,而不是无法选择服务器的负载均衡,这就需要每个服务器各自独立配置,以实现任意切换指定的服务器,或者独立运行多个客户端和配置来实现 (×_×)

我主要在Windows环境下使用,已经尝试了多种方法都无法达成这个目的,请问有实现方案吗?

谢谢

Support multiple ports

Mieru server should be able to listen to multiple ports and accept incoming connections from all of them.

Mieru client should be able to specify multiple ports to reach the server. When creating a new connection, a random port may be selected.

Sagernet mieru plugin error (libmieru exits too fast)

libmieru exits too fast (exit code:1)

Related log:
I/libmieru: 2022-08-32T25:67:74Z WARNING use stdout for logging due to the following error: prepareClientLogDir() failed: neither $XDG_CACHE_HOME nor $HOME are defined
I/libmieru: 2022-08-32T25:67:74Z FATAL load mieru client config failed: clientConfigFilePath() failed: prepareClientConfigDir() failed: neither $XDG_CONFIG_HOME nor $HOME are defined
D/v2ray-core: app/log: Logger closing

Sagernet Screenshot:
Screenshot_Issue

無法在 Asus 路由器 RT-AC86U 上執行 mita 伺服器

你好,本人打算在路由器上執行 mita 作為伺服器,於是編譯了 arm64 版本的執行檔,起初在 terminal 上成功執行 mieru helpmita help,不過,執行 mita status 時出錯。

第1個錯誤訊息:get mieru server status failed: ServerLifecycleService.GetStatus() failed: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix /var/run/mita.sock: connect: no such file or directory"

2022-06-02_181117


之後我在 var/run 新增了 mita.sock 文件,執行 mita status 成功,不過執行 mita appl/mnt/sda/mieru/mita apply config /mnt/sda/mieru/server_config.json 失敗

2022-06-02_180148


第2個錯誤訊息:get mieru server status failed: ServerLifecycleService.GetStatus() failed: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix /var/run/mita.sock: connect: connection refused"

2022-06-02_181659


可否像 hysteria 一樣推出無 tun 版本或路由器專用版本?謝謝

apernet/hysteria#105

服务端载入配置后,密码变成乱码

系统:debian11
ssh软件:finalshell mac版
不管是用nano还是下载到本机查看配置文件,密码都是自己设定的,可在服务端输入mita describe config后,输出的配置文件里的密码确是乱码,再次检查服务端的配置文件,密码依然正常人。并且运行后客户端不管输入原密码还是乱码都无法连接。
屏幕快照 2022-08-17 下午1 43 17
屏幕快照 2022-08-17 下午1 43 28

能否支持docker运行?

我尝试了一晚上,最后得到的成果是容器运行之后立刻退出……
在配置中设置日志等级为TRACE也未见更多输出
Attaching to mieru
mieru | mieru client is started, listening to 127.0.0.1:56464
mieru exited with code 0
mieru | mieru client is started, listening to 127.0.0.1:56464
mieru exited with code 0
mieru | mieru client is started, listening to 127.0.0.1:56464
mieru exited with code 0
mieru | mieru client is started, listening to 127.0.0.1:56464
mieru exited with code 0

Http proxy

Is it possible to open a http proxy on different port alongside socks proxy?

Error exit to fast!

I get this error (v2ray v4.45.2 server and mieru 1.7 and client is SageNet), any solution?
Both side use 1.7.0 mieru version
Screenshot_20221010-210615_SagerNet
Screenshot_20221010-210654_SagerNet

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.