MetaCubeX / mihomo

A simple Python Pydantic model for Honkai: Star Rail parsed data from the Mihomo API.
https://wiki.metacubex.one
MIT License
15.67k stars 2.57k forks source link

[Feature] Add AmneziaWG Protocol #1507

Closed leaked closed 1 week ago

leaked commented 2 weeks ago

Verify steps

Description

Hello Please add this protocol to the program https://github.com/amnezia-vpn/amneziawg-go

https://github.com/amnezia-vpn/amneziawg-windows-client https://github.com/amnezia-vpn/amneziawg-android

Thanks

Possible Solution

No response

wwqgtxx commented 1 week ago

done https://github.com/MetaCubeX/mihomo/commit/781b783346f58bbba3370ed4708a806e4b71c24f

leaked commented 6 days ago

done 781b783

I built the latest commit, but I couldn't connect to the server. Did you test it yourself?

wwqgtxx commented 6 days ago

Did you write a wrong config file?

amnezia-wg-option is under the top level config instead of inside peers.

leaked commented 6 days ago

Did you write a wrong config file?

amnezia-wg-option is under the top level config instead of inside peers.

I checked several times and everything seems to be correct, but the problem is from somewhere else

  - name: "test"
    type: wireguard
    server: 1.1.1.1
    port: 443
    private-key: eCtXsJZ27+4PbhDkHnB923tkUn2Gj59wZw5wFA75MnU=
    public-key: Cr8hWlKvtDt7nrvf+f0brNQQzabAqrjfBvas9pmowjo=
    pre-shared-key: 31aIhAPwktDGpH4JDhA8GNvjFXEf/a6+UaQRyOAiyfM=
    ip: 172.16.0.2
    allowed-ips: ["0.0.0.0/0", "::/0"]
    remote-dns-resolve: true
    dns: [1.1.1.1, 1.0.0.1]
    persistent-keepalive: 25
    amnezia-wg-option:
      jc: 5
      jmin: 500
      jmax: 501
      s1: 30
      s2: 40
      h1: 123456
      h2: 67543
      h3: 123123
      h4: 32345
    mtu: 1420
    udp: true

Can we connect on a platform like Telegram so I can send you the server information for testing?

wwqgtxx commented 6 days ago

Maybe you can send the real configuration to the gmail of the same name, and attach the configuration file that can be linked normally in the amneziawg official client.

leaked commented 6 days ago

Maybe you can send the real configuration to the gmail of the same name, and attach the configuration file that can be linked normally in the amneziawg official client.

I sent it to you, thank you.

wwqgtxx commented 6 days ago

fixed in: https://github.com/MetaCubeX/mihomo/commit/6c0383026eeeab77853d048fc1434b3529e468a8