Detect scans the current system for supported proxy clients and returns one Client entry for each found install. Order is not stable.
()
| 39 | // Detect scans the current system for supported proxy clients and returns |
| 40 | // one Client entry for each found install. Order is not stable. |
| 41 | func Detect() []Client { |
| 42 | var out []Client |
| 43 | if c, ok := detectXray(); ok { |
| 44 | out = append(out, c) |
| 45 | } |
| 46 | if c, ok := detectV2ray(); ok { |
| 47 | out = append(out, c) |
| 48 | } |
| 49 | if c, ok := detectSingBox(); ok { |
| 50 | out = append(out, c) |
| 51 | } |
| 52 | return out |
| 53 | } |
| 54 | |
| 55 | // -- xray / v2ray (JSON config, same shape) -------------------------------- |
| 56 |
no test coverage detected