MatsuriDayo / nekoray

Qt based cross-platform GUI proxy configuration manager (backend: sing-box)
https://matsuridayo.github.io/
GNU General Public License v3.0
13.47k stars 1.26k forks source link

BUG: Tune "Whitelist mode" not working #1459

Open IvanNovR opened 1 month ago

IvanNovR commented 1 month ago

When "Whitelist mode" checkbox in checked in Tun settings, "Proxy process name" list is just completely ignored and all traffic just goes through VPN. Blacklist mode works correctly. I tried v4.0-beta4, v4.0-beta3 and 3.26 (all three versions with sing-box core) and all three versions have this error. The solution from here doesn't work.

Expected behavior: Only processes from white list go through VPN.

Actual behavior: All processes go through VPN.

How to reproduce

image image

erius0 commented 1 month ago

What OS are you using? Have you tried reinstalling the program? Could you have set global custom routes and forgot about it? Go to Routing Settings -> Common -> Custom Route (global) and show the contents. Check the neko.log file - if the traffic is going through the bypass outbound, then the problem lies somewhere else. Try deleting all routing settings expect the TUN whitelist settings and see if something changes.

Какую ОС ты используешь? Пробовал переустановить софт? Может ты задал кастомные глобальные маршруты и забыл про них? Зайди в Настройки маршрутов -> Общие -> Кастомные маршурты (global) и покажи содержимое. Посмотри файл neko.log - если трафик идет через bypass outbound, то скорее всего проблема в чем-то другом. Попробуй удалить все настройки маршрутов, кроме настроек белого списка TUN и проверь, будут ли какие-либо изменения.

Enirsa commented 4 weeks ago

~I confirm that no matter what I do, I can't get TUN to work only for specific processes (or to work for all, but exclude some). Tested on 4.0-beta4. This is the most desired feature for me, unfortunately.~

Never mind. Setting default outbound in routing settings to "bypass" did it for me: image

p.s. This works better on 3.26 by the way, 4.0+ takes some time to establish the connection (or whatever it's doing) initially, and 3.26 starts working immediately.

IvanNovR commented 3 weeks ago

What OS are you using? Have you tried reinstalling the program? Could you have set global custom routes and forgot about it? Go to Routing Settings -> Common -> Custom Route (global) and show the contents. Check the neko.log file - if the traffic is going through the bypass outbound, then the problem lies somewhere else. Try deleting all routing settings expect the TUN whitelist settings and see if something changes.

Какую ОС ты используешь? Пробовал переустановить софт? Может ты задал кастомные глобальные маршруты и забыл про них? Зайди в Настройки маршрутов -> Общие -> Кастомные маршурты (global) и покажи содержимое. Посмотри файл neko.log - если трафик идет через bypass outbound, то скорее всего проблема в чем-то другом. Попробуй удалить все настройки маршрутов, кроме настроек белого списка TUN и проверь, будут ли какие-либо изменения.

I am using windows 11. Tried reinstalling the program and using different versions from 3.26 and up. I don't have global route settings either, attached screenshot below. In the logs via bypass only what is configured in Settings - Routing Settings - Basic Routes - Direct.

Я использую windows 11. Пробовал переустанавливать программу и использовать различные версии начиная с 3.26 и выше. Настроек глобальных маршрутов у меня также нету, приложил скриншот ниже. В логах через bypass идет только то, что настроено в Настройки - Настройки маршрутизации - Базовые маршруты - Напрямую.

image

~I confirm that no matter what I do, I can't get TUN to work only for specific processes (or to work for all, but exclude some). Tested on 4.0-beta4. This is the most desired feature for me, unfortunately.~

Never mind. Setting default outbound in routing settings to "bypass" did it for me: image

p.s. This works better on 3.26 by the way, 4.0+ takes some time to establish the connection (or whatever it's doing) initially, and 3.26 starts working immediately.

I wrote above with a link to a post with a similar issue and pointed out that it doesn't work for me, and attached a screenshot of the routing settings.


The problem still remains unsolved

DADA30000 commented 3 weeks ago

Для тех у кого та же проблема @IvanNovCode В sing-box есть правило маршрутизации под названием process_path_regex, можно вместо названия процесса использовать это правило примерно вот так

{
  "rules": [
        {
        "process_path_regex": [
                    "^.*Discord.exe$",
                    "^.*msedge.exe$"
        ],
        "outbound": "proxy"
        },
  ]
}

Работает на NixOS, но не знаю как будет на винде, по идее тоже должно работать