Files
termux-packages/packages/wireproxy/0001-drop-sandbox.patch
2024-10-22 06:08:08 +00:00

33 lines
699 B
Diff

--- a/cmd/wireproxy/main.go
+++ b/cmd/wireproxy/main.go
@@ -10,6 +10,7 @@
"os"
"os/exec"
"os/signal"
+ "runtime"
"strconv"
"syscall"
@@ -52,6 +53,10 @@
}
func lock(stage string) {
+ // Do not use sandbox-related operations on Android
+ if runtime.GOOS == "android" {
+ return
+ }
switch stage {
case "boot":
exePath := executablePath()
@@ -115,6 +120,10 @@
}
func lockNetwork(sections []wireproxy.RoutineSpawner, infoAddr *string) {
+ // Do not use sandbox-related operations on Android
+ if runtime.GOOS == "android" {
+ return
+ }
var rules []landlock.Rule
if infoAddr != nil && *infoAddr != "" {
rules = append(rules, landlock.BindTCP(extractPort(*infoAddr)))