feat: fix proxy compatibility and establish TUI foundation

This commit is contained in:
proxyctl coordinator
2026-07-17 20:30:52 +08:00
parent 0f4c122eff
commit daeb788eac
34 changed files with 1521 additions and 176 deletions
@@ -562,6 +562,25 @@ func TestDockerDaemonRestartFailureIsRedactedTruthfulAndRetryable(t *testing.T)
}
}
func TestDockerDaemonAcceptsCompleteHTTPProfileWithAdditionalSOCKSProxy(t *testing.T) {
a, record, daemonPath, _, _ := fixture(t)
p := &profile.Profile{
Name: "dual", Mode: profile.AdvancedMode,
HTTPURL: "http://localhost:7890", HTTPSURL: "http://localhost:7890", AllURL: "socks5://localhost:7890",
}
result := a.SetDesired(context.Background(), true, p)
if result.Err != nil || result.Inspection.State != target.Enabled {
t.Fatalf("dual-protocol result = %#v events=%v", result, record.events)
}
data, err := os.ReadFile(daemonPath)
if err != nil {
t.Fatal(err)
}
if !strings.Contains(string(data), `"http-proxy": "http://localhost:7890"`) || !strings.Contains(string(data), `"https-proxy": "http://localhost:7890"`) {
t.Fatalf("daemon config = %s", data)
}
}
func TestDockerDaemonRejectsIncompatibleProfileBeforeMutation(t *testing.T) {
for _, p := range []*profile.Profile{
{Name: "socks", Mode: profile.SingleMode, SingleURL: "socks5://proxy.example:1080"},