fix #322: add option general.find-process-mode, user can turn off findProcess feature in router

findProcess slow down connection due to repeat call to FindProcessName in router environment
this option has 3 values: always, strict, off
- always, equal to enable-process: true. Just try to merge all process related option into one
- strict, as default value, behavior remains unchanged
- off, turn off findProcess, useful in router environment
This commit is contained in:
chain710
2023-01-05 16:58:36 +08:00
committed by metacubex
parent fd48c6df8a
commit b4503908df
4 changed files with 137 additions and 70 deletions

View File

@ -309,7 +309,7 @@ func updateTunnels(tunnels []LC.Tunnel) {
func updateGeneral(general *config.General, force bool) {
tunnel.SetMode(general.Mode)
tunnel.SetAlwaysFindProcess(general.EnableProcess)
tunnel.SetFindProcessMode(general.EnableProcess, general.FindProcessMode)
dialer.DisableIPv6 = !general.IPv6
if !dialer.DisableIPv6 {
log.Infoln("Use IPv6")