hiddify / hiddify-next

Multi-platform auto-proxy client, supporting Sing-box, X-ray, TUIC, Hysteria, Reality, Trojan, SSH etc. It’s an open-source, secure and ad-free.
https://hiddify.com
Other
15.62k stars 1.44k forks source link

Tray icon requests input remote share in kde plasma 6.1 wayland when running in sudo mode and doesnt work after that #1012

Open Am1nsab83 opened 2 months ago

Am1nsab83 commented 2 months ago

Search first

What Happened?

Hi I recently updated my kde plasma DE to 6.1 and after that when I hit the tray icon, it requests a remote share for input and wen I grant it tray icon doesnt respond to right and left click I also should mention that I use the program in sudo mode (running it as root, although I know its potential threat ) in order to achieve enabling the vpn mode " tun interface mode" I have installed the program as debian and also tried the appimage version but error persist in both methods of using the program the bug doesnt appear on x11 but it is there on wayland there wasnt any bug like this on kde plasma 6.0<

OS: arch linux kernel version 6.9.7 ( surface custom kernel ) DE: kde plasma 6.1.2 WM: kwin Session type: Wayland

log when app is running as root:

flutter: 04:21:40.294597 [INFO]     [bootstrap] initializing [directories]
flutter: 04:21:40.295144 [DEBUG]    [bootstrap] [directories] initialized in 0ms
flutter: 04:21:40.295197 [INFO]     [bootstrap] initializing [app info]
flutter: 04:21:40.296009 [DEBUG]    [bootstrap] [app info] initialized in 0ms
flutter: 04:21:40.296039 [INFO]     [bootstrap] initializing [preferences]
flutter: 04:21:40.296070 [DEBUG]    [preferences] initializing preferences
flutter: 04:21:40.296211 [DEBUG]    [bootstrap] [preferences] initialized in 0ms
flutter: 04:21:40.296271 [INFO]     [bootstrap] initializing [analytics]
flutter: 04:21:40.296302 [DEBUG]    [AnalyticsController] enabling analytics
flutter: 04:21:40.296324 [DEBUG]    [LoggerController] adding [analytics] printer
flutter: 04:21:40.296520 [DEBUG]    [bootstrap] [analytics] initialized in 0ms
flutter: 04:21:40.296536 [INFO]     [bootstrap] initializing [preferences migration]
flutter: 04:21:40.296614 [DEBUG]    [PreferencesMigration] already using the latest version (v1)
flutter: 04:21:40.296630 [DEBUG]    [bootstrap] [preferences migration] initialized in 0ms
flutter: 04:21:40.296670 [DEBUG]    [PreferencesEntry<bool, dynamic>] getting persisted preference [debug_mode](bool)
flutter: 04:21:40.296681 [INFO]     [bootstrap] initializing [window controller]
flutter: 04:21:40.300466 [DEBUG]    [bootstrap] [window controller] initialized in 3ms
flutter: 04:21:40.300531 [DEBUG]    [PreferencesEntry<bool, bool>] getting persisted preference [silent_start](bool)
flutter: 04:21:40.300558 [DEBUG]    [bootstrap] silent start [Disabled]
flutter: 04:21:40.303628 [INFO]     [bootstrap] initializing [auto start service]
flutter: 04:21:40.303736 [INFO]     [AutoStartNotifier] auto start is [Disabled]
flutter: 04:21:40.303756 [DEBUG]    [bootstrap] [auto start service] initialized in 0ms
flutter: 04:21:40.303765 [INFO]     [bootstrap] initializing [logs repository]
flutter: 04:21:40.304326 [DEBUG]    [bootstrap] [logs repository] initialized in 0ms
flutter: 04:21:40.304353 [INFO]     [bootstrap] initializing [logger controller]
flutter: 04:21:40.304384 [INFO]     [bootstrap] hiddify v1.4.0 (10400) [prod]
general release
linux [Linux 6.9.7-arch1-1-surface #1 SMP PREEMPT_DYNAMIC Sun, 30 Jun 2024 15:25:52 +0000]
flutter: 04:21:40.304403 [INFO]     [bootstrap] initializing [geo assets repository]
flutter: 04:21:40.305089 [INFO]     [bootstrap] initializing [profile repository]
flutter: 04:21:40.305433 [INFO]     [bootstrap] initializing [active profile]
flutter: 04:21:40.306993 [INFO]     [bootstrap] initializing [deep link service]
flutter: 04:21:40.307128 [INFO]     [bootstrap] initializing [sing-box]
flutter: 04:21:40.307173 [INFO]     [bootstrap] initializing [system tray]

(hiddify:68664): libayatana-appindicator-WARNING **: 04:21:40.341: Unable to get the session bus: Error spawning command line “dbus-launch --autolaunch=a2346566a5df46309ae23c8efd039906 --binary-syntax --close-stderr”: Child process exited with code 1

(hiddify:68664): LIBDBUSMENU-GLIB-WARNING **: 04:21:40.341: Unable to get session bus: Error spawning command line “dbus-launch --autolaunch=a2346566a5df46309ae23c8efd039906 --binary-syntax --close-stderr”: Child process exited with code 1
flutter: 04:21:40.341558 [INFO]     [ConnectionNotifier] connection status: DISCONNECTED
flutter: 04:21:41.308087 [ERROR]    [bootstrap] [system tray] error initializing
flutter: 
flutter: 04:21:41.308390 [INFO]     [bootstrap] bootstrap took [1013ms]

log when app is running as user:

** (hiddify:68792): CRITICAL **: 04:23:59.384: Failed to read XDG desktop portal settings: GDBus.Error:org.freedesktop.portal.Error.NotFound: Requested setting not found

** (hiddify:68792): CRITICAL **: 04:23:59.385: Failed to read XDG desktop portal settings: GDBus.Error:org.freedesktop.portal.Error.NotFound: Requested setting not found

** (hiddify:68792): CRITICAL **: 04:23:59.386: Failed to read XDG desktop portal settings: GDBus.Error:org.freedesktop.portal.Error.NotFound: Requested setting not found

** (hiddify:68792): CRITICAL **: 04:23:59.386: Failed to read XDG desktop portal settings: GDBus.Error:org.freedesktop.portal.Error.NotFound: Requested setting not found

** (hiddify:68792): CRITICAL **: 04:23:59.387: Failed to read XDG desktop portal settings: GDBus.Error:org.freedesktop.portal.Error.NotFound: Requested setting not found
Gtk-Message: 04:23:59.391: Failed to load module "appmenu-gtk-module"
flutter: 04:23:59.468172 [INFO]     [bootstrap] initializing [directories]
flutter: 04:23:59.468651 [DEBUG]    [bootstrap] [directories] initialized in 0ms
flutter: 04:23:59.468703 [INFO]     [bootstrap] initializing [app info]
flutter: 04:23:59.469727 [DEBUG]    [bootstrap] [app info] initialized in 1ms
flutter: 04:23:59.469763 [INFO]     [bootstrap] initializing [preferences]
flutter: 04:23:59.469795 [DEBUG]    [preferences] initializing preferences
flutter: 04:23:59.469951 [DEBUG]    [bootstrap] [preferences] initialized in 0ms
flutter: 04:23:59.470011 [INFO]     [bootstrap] initializing [analytics]
flutter: 04:23:59.470041 [DEBUG]    [AnalyticsController] enabling analytics
flutter: 04:23:59.470062 [DEBUG]    [LoggerController] adding [analytics] printer
flutter: 04:23:59.470254 [DEBUG]    [bootstrap] [analytics] initialized in 0ms
flutter: 04:23:59.470270 [INFO]     [bootstrap] initializing [preferences migration]
flutter: 04:23:59.470290 [DEBUG]    [PreferencesMigration] already using the latest version (v1)
flutter: 04:23:59.470306 [DEBUG]    [bootstrap] [preferences migration] initialized in 0ms
flutter: 04:23:59.470349 [DEBUG]    [PreferencesEntry<bool, dynamic>] getting persisted preference [debug_mode](bool)
flutter: 04:23:59.470363 [INFO]     [bootstrap] initializing [window controller]
flutter: 04:23:59.474109 [DEBUG]    [bootstrap] [window controller] initialized in 3ms
flutter: 04:23:59.474162 [DEBUG]    [PreferencesEntry<bool, bool>] getting persisted preference [silent_start](bool)
flutter: 04:23:59.474185 [DEBUG]    [bootstrap] silent start [Enabled]
flutter: 04:23:59.474195 [DEBUG]    [bootstrap] silent start, remain hidden accessible via tray
flutter: 04:23:59.474203 [INFO]     [bootstrap] initializing [auto start service]
flutter: 04:23:59.474278 [INFO]     [AutoStartNotifier] auto start is [Enabled]
flutter: 04:23:59.474296 [DEBUG]    [bootstrap] [auto start service] initialized in 0ms
flutter: 04:23:59.474305 [INFO]     [bootstrap] initializing [logs repository]
flutter: 04:23:59.474862 [DEBUG]    [bootstrap] [logs repository] initialized in 0ms
flutter: 04:23:59.474885 [INFO]     [bootstrap] initializing [logger controller]
flutter: 04:23:59.474906 [DEBUG]    [bootstrap] [logger controller] initialized in 0ms
flutter: 04:23:59.474919 [INFO]     [bootstrap] hiddify v1.4.0 (10400) [prod]
general release
linux [Linux 6.9.7-arch1-1-surface #1 SMP PREEMPT_DYNAMIC Sun, 30 Jun 2024 15:25:52 +0000]
flutter: 04:23:59.474938 [INFO]     [bootstrap] initializing [geo assets repository]
flutter: 04:23:59.475048 [DEBUG]    [PreferencesEntry<int, int>] getting persisted preference [mixed-port](int)
flutter: 04:23:59.475141 [DEBUG]    [DioHttpClient] setting proxy port: [9080]
flutter: 04:23:59.475170 [DEBUG]    [GeoAssetRepositoryImpl] initializing
flutter: 04:23:59.475384 [DEBUG]    [bootstrap] [geo assets repository] initialized in 0ms
flutter: 04:23:59.475401 [INFO]     [bootstrap] initializing [profile repository]
flutter: 04:23:59.475546 [DEBUG]    [bootstrap] [profile repository] initialized in 0ms
flutter: 04:23:59.475561 [INFO]     [bootstrap] initializing [active profile]
flutter: 04:23:59.475606 [DEBUG]    [ActiveProfile] watching active profile
flutter: 04:23:59.476777 [DEBUG]    [bootstrap] [active profile] initialized in 1ms
flutter: 04:23:59.476803 [INFO]     [bootstrap] initializing [deep link service]
flutter: 04:23:59.476891 [DEBUG]    [bootstrap] [deep link service] initialized in 0ms
flutter: 04:23:59.476905 [INFO]     [bootstrap] initializing [sing-box]
flutter: 04:23:59.476920 [DEBUG]    [FFISingboxService] initializing
flutter: 04:23:59.476937 [DEBUG]    [bootstrap] [sing-box] initialized in 0ms
flutter: 04:23:59.476946 [INFO]     [bootstrap] initializing [system tray]
flutter: 04:23:59.479145 [INFO]     [ConnectionNotifier] connection status: DISCONNECTED
flutter: 04:23:59.479219 [DEBUG]    [PreferencesEntry<ServiceMode, String>] getting persisted preference [service-mode](ServiceMode)
flutter: 04:23:59.479290 [DEBUG]    [SystemTrayNotifier] updating system tray
flutter: 04:23:59.482701 [DEBUG]    [bootstrap] [system tray] initialized in 5ms
flutter: 04:23:59.482777 [INFO]     [bootstrap] bootstrap took [14ms]
flutter: 04:23:59.483219 [DEBUG]    [PreferencesEntry<bool, dynamic>] getting persisted preference [intro_completed](bool)
flutter: 04:23:59.483757 [DEBUG]    [ForegroundProfilesUpdateNotifier] intro done, starting
flutter: 04:23:59.490732 [DEBUG]    [PreferencesEntry<bool, bool>] getting persisted preference [auto_check_ip](bool)
flutter: 04:23:59.490948 [DEBUG]    [RouterListenable] triggering listener
flutter: 04:23:59.491213 [DEBUG]    [PreferencesEntry<Region, String>] getting persisted preference [region](Region)
flutter: 04:23:59.491420 [DEBUG]    [ForegroundProfilesUpdateNotifier] cycle [0]
flutter: 04:23:59.491451 [DEBUG]    [ForegroundProfilesUpdateNotifier] too soon! previous run: [2024-07-06 04:11:54.652334]
flutter: 04:23:59.492290 [DEBUG]    [PreferencesEntry<LogLevel, String>] getting persisted preference [log-level](LogLevel)
flutter: 04:23:59.492336 [DEBUG]    [PreferencesEntry<bool, bool>] getting persisted preference [resolve-destination](bool)
flutter: 04:23:59.492388 [DEBUG]    [PreferencesEntry<IPv6Mode, String>] getting persisted preference [ipv6-mode](IPv6Mode)
flutter: 04:23:59.492426 [DEBUG]    [PreferencesEntry<String, String>] getting persisted preference [remote-dns-address](String)
flutter: 04:23:59.492464 [DEBUG]    [PreferencesEntry<DomainStrategy, String>] getting persisted preference [remote-dns-domain-strategy](DomainStrategy)
flutter: 04:23:59.492495 [DEBUG]    [PreferencesEntry<String, String>] getting persisted preference [direct-dns-address](String)
flutter: 04:23:59.492511 [DEBUG]    [PreferencesEntry<DomainStrategy, String>] getting persisted preference [direct-dns-domain-strategy](DomainStrategy)
flutter: 04:23:59.492543 [DEBUG]    [PreferencesEntry<int, int>] getting persisted preference [tproxy-port](int)
flutter: 04:23:59.492560 [DEBUG]    [PreferencesEntry<int, int>] getting persisted preference [local-dns-port](int)
flutter: 04:23:59.492590 [DEBUG]    [PreferencesEntry<TunImplementation, String>] getting persisted preference [tun-implementation](TunImplementation)
flutter: 04:23:59.492619 [DEBUG]    [PreferencesEntry<int, int>] getting persisted preference [mtu](int)
flutter: 04:23:59.492634 [DEBUG]    [PreferencesEntry<bool, bool>] getting persisted preference [strict-route](bool)
flutter: 04:23:59.492677 [DEBUG]    [PreferencesEntry<String, String>] getting persisted preference [connection-test-url](String)
flutter: 04:23:59.493063 [DEBUG]    [PreferencesEntry<Duration, int>] getting persisted preference [url-test-interval](Duration)
flutter: 04:23:59.493104 [DEBUG]    [PreferencesEntry<bool, bool>] getting persisted preference [enable-clash-api](bool)
flutter: 04:23:59.493122 [DEBUG]    [PreferencesEntry<int, int>] getting persisted preference [clash-api-port](int)
flutter: 04:23:59.493139 [DEBUG]    [PreferencesEntry<bool, bool>] getting persisted preference [bypass-lan](bool)
flutter: 04:23:59.493155 [DEBUG]    [PreferencesEntry<bool, bool>] getting persisted preference [allow-connection-from-lan](bool)
flutter: 04:23:59.493176 [DEBUG]    [PreferencesEntry<bool, bool>] getting persisted preference [enable-fake-dns](bool)
flutter: 04:23:59.493190 [DEBUG]    [PreferencesEntry<bool, bool>] getting persisted preference [enable-dns-routing](bool)
flutter: 04:23:59.493205 [DEBUG]    [PreferencesEntry<bool, bool>] getting persisted preference [independent-dns-cache](bool)
flutter: 04:23:59.493220 [DEBUG]    [PreferencesEntry<bool, bool>] getting persisted preference [enable-mux](bool)
flutter: 04:23:59.493235 [DEBUG]    [PreferencesEntry<bool, bool>] getting persisted preference [mux-padding](bool)
flutter: 04:23:59.493249 [DEBUG]    [PreferencesEntry<int, int>] getting persisted preference [mux-max-streams](int)
flutter: 04:23:59.493283 [DEBUG]    [PreferencesEntry<MuxProtocol, String>] getting persisted preference [mux-protocol](MuxProtocol)
flutter: 04:23:59.493311 [DEBUG]    [PreferencesEntry<bool, bool>] getting persisted preference [enable-tls-fragment](bool)
flutter: 04:23:59.493339 [DEBUG]    [PreferencesEntry<OptionalRange, String>] getting persisted preference [tls-fragment-size](OptionalRange)
flutter: 04:23:59.493365 [DEBUG]    [PreferencesEntry<OptionalRange, String>] getting persisted preference [tls-fragment-sleep](OptionalRange)
flutter: 04:23:59.493380 [DEBUG]    [PreferencesEntry<bool, bool>] getting persisted preference [enable-tls-mixed-sni-case](bool)
flutter: 04:23:59.493395 [DEBUG]    [PreferencesEntry<bool, bool>] getting persisted preference [enable-tls-padding](bool)
flutter: 04:23:59.493409 [DEBUG]    [PreferencesEntry<OptionalRange, String>] getting persisted preference [tls-padding-size](OptionalRange)
flutter: 04:23:59.493424 [DEBUG]    [PreferencesEntry<bool, bool>] getting persisted preference [enable-warp](bool)
flutter: 04:23:59.493453 [DEBUG]    [PreferencesEntry<WarpDetourMode, String>] getting persisted preference [warp-detour-mode](WarpDetourMode)
flutter: 04:23:59.493475 [DEBUG]    [PreferencesEntry<String, String>] getting persisted preference [warp-wireguard-config](String)
flutter: 04:23:59.493491 [DEBUG]    [PreferencesEntry<String, String>] getting persisted preference [warp-license-key](String)
flutter: 04:23:59.493507 [DEBUG]    [PreferencesEntry<String, String>] getting persisted preference [warp-account-id](String)
flutter: 04:23:59.493550 [DEBUG]    [PreferencesEntry<String, String>] getting persisted preference [warp-access-token](String)
flutter: 04:23:59.493565 [DEBUG]    [PreferencesEntry<String, String>] getting persisted preference [warp-clean-ip](String)
flutter: 04:23:59.493578 [DEBUG]    [PreferencesEntry<int, int>] getting persisted preference [warp-port](int)
flutter: 04:23:59.493593 [DEBUG]    [PreferencesEntry<OptionalRange, String>] getting persisted preference [warp-noise](OptionalRange)
flutter: 04:23:59.493607 [DEBUG]    [PreferencesEntry<OptionalRange, String>] getting persisted preference [warp-noise-delay](OptionalRange)
flutter: 04:23:59.493623 [DEBUG]    [PreferencesEntry<String, String>] getting persisted preference [warp2-wireguard-config](String)
flutter: 04:23:59.493638 [DEBUG]    [PreferencesEntry<String, String>] getting persisted preference [warp2s-license-key](String)
flutter: 04:23:59.493651 [DEBUG]    [PreferencesEntry<String, String>] getting persisted preference [warp2-account-id](String)
flutter: 04:23:59.493665 [DEBUG]    [PreferencesEntry<String, String>] getting persisted preference [warp2-access-token](String)

Minimal Reproducible Example (MRE)

Launch the app in with sudo permission in kde plasma 6.1> with wayland desktop session and try out icon

Expected Behavior

the tray Icon at the first place doesnt need to request remote share input, second it should respond to the right and left click which

left click: hides app to tray and unhind it

right click: open quick menu for app

Version

1.4.0

Platform/OS

Linux

Additional Context

and here are the screen shots of the request and my neofetch output and also my systeminfo

neofetch:

Screenshot_20240706_042729

input request:

Screenshot_20240706_042638

system info for more information:

Screenshot_20240706_043224

Application Config Options

No response

Relevant log output

mentioned in the problem

Are you willing to submit a PR? If you know how to fix the bug.

llleeexxxoooppp commented 3 weeks ago

I have exact same issue, i need to vpn mode so i need grant root access, then i assume same behavior. Me too using arch linux with kde wayland session, but Hiddify 2.2.0. I guess it's by cause of lack native wayland implementation in hiddify and recent changes in kde with access of input control devices for apps launching at xwayland.

Am1nsab83 commented 2 weeks ago

I have exact same issue, i need to vpn mode so i need grant root access, then i assume same behavior. Me too using arch linux with kde wayland session, but Hiddify 2.2.0. I guess it's by cause of lack native wayland implementation in hiddify and recent changes in kde with access of input control devices for apps launching at xwayland.

I found out it's not the problem of hiddify ( if we don't count wayland support ) It's a plasma problem with all x11 apps using xwayland, I also have it for applications running Java tray icon ( jdownloader )

If you wanna use hiddify ( or any other vpns like oblivion that doesn't support tun or just an http or socks5 proxy you found ) you can use scriptinator + tun2proxy ( don't go through tun2socks tun setup hazel, tun2proxy has auto setup )

Just use pkexec instead of sudo for gui password request and for stopping tun assign a pkexec pkill tun2proxy

Note if you use proxy server or oblivion: bypass the endpoint of oblivion or the server you're using alongside 127.0.0.1 so tun can work properly, no need for bypassing in hiddify

I think it's better to open another issue for wayland support at this point so I close this issue

titancomputer commented 1 week ago

try v2.3.1 and check if problem has been solved or not