apernet / hysteria

Hysteria is a powerful, lightning fast and censorship resistant proxy.
https://v2.hysteria.network/
MIT License
14.01k stars 1.57k forks source link

A 3rd-party GUI client for hysteria. (support hy1 and hy2) #675

Closed LorenEteval closed 10 months ago

LorenEteval commented 10 months ago

Hi! Recently I added hy2 support for my GUI client project Furious (it also remains hy1 support). Given that hy2 are not compatible with hy1, the basic idea is to generate corresponding Python binding seperately and integrate them into the GUI client.

If you are kind enough to verify that it does work, you can import your existing hy2(or even hy1) config using Furious(only supports json format configuration due to its design), then connect via GUI. It will "sense" the config intelligently and figure out if it's hy1 or hy2 config.

However, notice that I didn't add support for importing from/exporting to hysteria share link, since nearly all the one-click installation scripts for hysteria already generate client configuration for the user, so it's easy to copy & paste or import from JSON using Furious built-in feature. I may add this in the future.

Hope I can get my project address listed in hysteria 3rd-party apps page. Thanks!

*Edited:

Seems it's only for proxy app...? If it does not meet requirements please ignore this issue.

tobyxdd commented 10 months ago

Thanks for your work. I'll test it and add it to the list if it works.

tobyxdd commented 10 months ago

I gave it a try and I must say it exceeded my expectations 💯 At first I thought it might be something like v2rayN where you have to download the core manually and the GUI is nothing more than a launcher. But apparently your app can detect the type of config and its fields, download the core, and set the system proxy settings all automatically.

This is probably the best Hysteria 2 desktop GUI right now, I'm definitely adding it to the list 👍 (edit: added https://v2.hysteria.network/docs/getting-started/3rd-party-apps/)

A few small suggestions:

tobyxdd commented 10 months ago

I see that you copied the entire content of the Hysteria repo (https://github.com/LorenEteval/hysteria2-python/tree/main/hysteria2-go) and only changed a few lines. Maybe this can be handled better by adding it as a git submodule and extracting the changes into a patch file that is applied on build? (so it's easier to update)

LorenEteval commented 10 months ago

I gave it a try and I must say it exceeded my expectations 💯 At first I thought it might be something like v2rayN where you have to download the core manually and the GUI is nothing more than a launcher. But apparently your app can detect the type of config and its fields, download the core, and set the system proxy settings all automatically.

This is probably the best Hysteria 2 desktop GUI right now, I'm definitely adding it to the list 👍 (edit: added https://v2.hysteria.network/docs/getting-started/3rd-party-apps/)

A few small suggestions:

  • The only way to connect/disconnect is through the tray icon (nothing on the main window), which can be confusing for new users.
  • At first I didn't realize that you could paste the Hysteria config directly, as I thought it needed a separate config format like v2ray or sing-box... maybe it's better to clarify this in the documentation or on the GUI itself.
  • YAML support would be nice, since all our official documentation uses YAML.

Thank you and thanks for the advice! I'll definitely take a look into it. By the way, cores are shipped as dynamic link libraries(Python bindings) with Furious (.pyd on Windows or .so on non-Windows platform), so it just runs with user configuration on the fly.

LorenEteval commented 10 months ago

I see that you copied the entire content of the Hysteria repo (https://github.com/LorenEteval/hysteria2-python/tree/main/hysteria2-go) and only changed a few lines. Maybe this can be handled better by adding it as a git submodule and extracting the changes into a patch file that is applied on build? (so it's easier to update)

Yes, definitely easier to apply changes each time when hy2 updates using submodule. Frankly, I missed this when I started generating bindings for each core project because I thought another "git" dependency would be introduced when installing via pip, but it seems I was completely wrong. I may fork each core project in the future and refactor them into submodules.