Includes, but not limited to: - zapret2 support - declarative inbounds - proxy-ctl revamp - automatic proxy learning
64 lines
1.2 KiB
Nix
64 lines
1.2 KiB
Nix
{
|
|
mkBadProxySuiteFixture,
|
|
mkFailingAssertions,
|
|
}:
|
|
|
|
{
|
|
assertions = mkFailingAssertions mkBadProxySuiteFixture [
|
|
# Outbound tags must be unique.
|
|
{
|
|
enable = true;
|
|
proxy = {
|
|
enable = true;
|
|
backend = "sing-box";
|
|
outbounds = [
|
|
{
|
|
tag = "dup";
|
|
url = "http://one.example.com:8080";
|
|
}
|
|
{
|
|
tag = "dup";
|
|
url = "http://two.example.com:8080";
|
|
}
|
|
];
|
|
};
|
|
}
|
|
|
|
# Built-in outbound names are reserved.
|
|
{
|
|
enable = true;
|
|
proxy = {
|
|
enable = true;
|
|
backend = "sing-box";
|
|
outbounds = [
|
|
{
|
|
tag = "proxy";
|
|
url = "http://proxy.example.com:8080";
|
|
}
|
|
];
|
|
};
|
|
}
|
|
|
|
# Explicit routing rules must target an existing outbound.
|
|
{
|
|
enable = true;
|
|
proxy = {
|
|
enable = true;
|
|
backend = "sing-box";
|
|
outbounds = [
|
|
{
|
|
tag = "primary";
|
|
url = "http://proxy.example.com:8080";
|
|
}
|
|
];
|
|
routing.rules = [
|
|
{
|
|
outbound = "missing";
|
|
domains = [ "example.com" ];
|
|
}
|
|
];
|
|
};
|
|
}
|
|
];
|
|
}
|