-
Notifications
You must be signed in to change notification settings - Fork 308
feat: dynamic ingress control for running sandboxes #2093
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
levb
wants to merge
168
commits into
main
Choose a base branch
from
lev-ingress-control
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
168 commits
Select commit
Hold shift + click to select a range
2fbecf5
feat(api): add PUT /sandboxes/{sandboxID}/network endpoint (stage 1)
levb af2b869
fix(test): use valid-format sandbox ID in TestUpdateNetworkConfig_Not…
levb d541327
feat(orchestrator): wire dynamic network egress updates end-to-end
levb 2db7190
refactor(api): simplify UpdateSandboxNetworkConfig return and remove …
levb 4511929
feat(api): support domain filtering in network update path
levb d4f93b8
test: add pause/resume persistence test for dynamic network updates
levb 027a24a
fix: address revive lint for redundant if-return in update_network
levb f8c876f
test: add domain allow/remove tests for dynamic network updates
levb d5c8fbc
refactor: merge 3 RWMutexes into 1, guarantee GetNetwork() non-nil, u…
levb 286c6f1
fix: validate CIDRs before firewall reset, add 409 to OpenAPI spec, u…
levb ef4708b
chore: auto-commit generated changes
github-actions[bot] cc5e43d
fix(test): initialize networkEgress in TestIsEgressAllowed
levb c452eae
Merge branch 'lev-allow-deny-dynamic' of github.com:e2b-dev/infra int…
levb 8bd0c92
fix(api): persist store update only after gRPC node update succeeds
levb 942d1e1
refactor: migrate all callers to atomic ReplaceUserRules, remove one-…
levb 66dcfbb
chore: auto-commit generated changes
github-actions[bot] b986f2c
fix: bypass firewall_toolkit validation for 0.0.0.0/0 CIDR
levb 1a95c13
lint
levb 79cc831
fix(api): validate denyOut and domain rules in network update endpoint
levb 8bf22fa
test: consolidate network update integration tests into comprehensive…
levb da52196
PR feedback: extract shared egress validation and use ReportErrorByCode
levb 3e5923b
PR feedback: embed SandboxNetworkEgressConfig in update network request
levb 73d370a
PR feedback: move state check into updateFunc to match KeepAliveFor p…
levb 9417d82
PR feedback: always set firewallCustomRules after UpdateInternet
levb b853ee4
lint: simplify redundant if-return in updateSandboxNetworkOnNode call
levb dcbc89d
PR feedback: merge UpdateNetwork into unified Update RPC with transac…
levb ed87f50
PR feedback: remove unnecessary networkEgress init from ResumeSandbox
levb 0b2193b
Merge branch 'main' of github.com:e2b-dev/infra into lev-allow-deny-d…
levb 9524334
fix: restore networkEgress init in ResumeSandbox
levb 31175f4
Merge branch 'main' of github.com:e2b-dev/infra into lev-allow-deny-d…
levb 2c46352
PR feedback: unify egress config building and add domain validation
levb 50fdf2f
PR feedback: extract ApplyAllOrRollback utility for transactional upd…
levb f8c2100
PR feedback: move network config into Config with own RWMutex
levb e1cc432
PR feedback: handle wildcard domains in IDNA validation
levb fe7a6db
PR feedback: rename ApplyAllOrRollback to ApplyAllOrNone, fix test
levb 89c30ef
feat: add dynamic ingress control for sandboxes
levb 2ba9d60
refactor: deduplicate ingress validation and avoid hot-path allocation
levb f4059c7
test: add ingress control integration tests
levb 51fec51
test: speed up ingress integration tests
levb 22671e3
test: restore egress CIDR intersection tests
levb 65daa0d
chore: auto-commit generated changes
github-actions[bot] cf2b029
fix: lint issues from CI (protogetter, revive, modernize, unparam)
levb 18ac69f
fix: consolidate client IP extraction and fix XFF spoofing
levb 248ffcf
Merge branch 'lev-ingress-control' of github.com:e2b-dev/infra into l…
levb e449b68
test: add integration test for dynamic MaskRequestHost updates
levb f2df7ed
fix: include IPv6 CIDRs in client IP deny tests
levb b1240d0
fix: fix MaskRequestHost test echo server startup
levb 2a4e32e
fix: reject allowIn without deny-all and clean up test names
levb a457ea6
Merge branch 'main' of github.com:e2b-dev/infra into lev-allow-deny-d…
levb 60351fc
Merge branch 'lev-allow-deny-dynamic' into lev-ingress-control
levb b97f951
fix(orchestrator): use context.WithoutCancel for egress rollback
levb b609b47
refactor(orchestrator): restore ApplyAllOrNone for update rollbacks
levb e1b618d
test: trim redundant unit tests, add combined egress+ingress integrat…
levb 2b4e58a
chore: auto-commit generated changes
github-actions[bot] 68f5571
fix: close response body from WaitForStatus to satisfy bodyclose lint
levb c38bf3b
Merge branch 'lev-ingress-control' of github.com:e2b-dev/infra into l…
levb e1a910c
fix(client-proxy): strip X-E2B-Client-IP before extracting client IP
levb a5d435c
PR feedback: removed questionable domain "validation"
levb aa11b20
PR feedback: restored accidentally removed comment
levb bc61dae
PR feedback: clarify nftables buffering semantics in clearAndReplaceC…
levb 15ee24a
PR feedback: add NewConfig constructor to guarantee non-nil network c…
levb 6f21b57
Merge branch 'main' of github.com:e2b-dev/infra into lev-allow-deny-d…
levb 19f2de9
Fix and simplify sandboxes_update_test.go after merge with main
levb d8be629
Fix nlreturn lint: add blank line before return in clearAndReplaceCIDRs
levb 71ff3e0
Merge remote-tracking branch 'e2b/lev-allow-deny-dynamic' into lev-in…
levb e1eee7f
Fix data race on network egress/ingress config access
levb 89c3dd2
Fix data race on network egress/ingress config access
levb 4e8a061
Merge branch 'lev-allow-deny-dynamic' into lev-ingress-control
levb 5d7abe5
Merge branch 'main' of github.com:e2b-dev/infra into lev-allow-deny-d…
levb 645148b
Fix spoofed-IP ingress tests to use XFF instead of X-E2B-Client-IP
levb 4de0587
Merge branch 'main' of github.com:e2b-dev/infra into lev-allow-deny-d…
levb cf29fc8
feat(api): add port range syntax to egress allow/deny rules (stage 1)
levb 1fdee8a
feat(orch): unify proto fields, add port-specific egress rules, integ…
levb 560afad
Merge branch 'main' of github.com:e2b-dev/infra into lev-allow-deny-d…
levb cd73d71
Merge branch 'lev-allow-deny-dynamic' into lev-egress-port-ranges
levb 8b34a82
refactor(tests): speed up egress integration tests
levb ddef2ac
chore: auto-commit generated changes
github-actions[bot] c52a45c
fix(lint): use errors.Is for ErrNotFound, fix unparam in DNS helper
levb 4c58142
Merge branch 'lev-egress-port-ranges' of github.com:e2b-dev/infra int…
levb 0082dd0
Merge branch 'lev-egress-port-ranges' into lev-ingress-control
levb b6e803d
fix(lint): use errors.Is for ErrNotFound after #2100 removed NotFound…
levb 2cab438
Merge branch 'lev-allow-deny-dynamic' into lev-egress-port-ranges
levb 9492095
PR feedback: reject IPv6 addresses in ParseRule to prevent misparse
levb 1cfe761
PR feedback: pre-parse egress rules at config time, not per-connection
levb 7bf84ee
consolidate network egress integration tests into single-sandbox pattern
levb e910bab
fix(lint): flatten subtests to top-level funcs, rename clear helper
levb 1340a03
remove UDP-only restriction from nftables port rules
levb 5903d43
speed up integration tests: reduce blocked connection timeouts
levb 6ee76ca
refactor: unify network ACL types, eliminate per-connection parsing i…
levb 3e262b4
fix: treat empty host as 0.0.0.0/0, reject domains in deny at parse time
levb e24837d
Merge branch 'main' of github.com:e2b-dev/infra into lev-allow-deny-d…
levb a438dc7
Merge branch 'lev-allow-deny-dynamic' into lev-egress-port-ranges
levb 3f6c11c
Merge branch 'lev-egress-port-ranges' into lev-ingress-control
levb 7c0484d
refactor(tests): consolidate network integration tests into single sa…
levb 74faef4
fix(tests): add IPv6 CIDRs to port-specific ingress deny tests
levb c618990
refactor: move ingress ACL from Metadata to Config, consistent with e…
levb 0dce6e5
fix(security): fail closed on unparseable client IP in ingress check
levb 8667c54
chore: auto-commit generated changes
github-actions[bot] 0b8fb40
refactor: code review cleanup for ingress control
levb 7f61f39
Merge branch 'lev-ingress-control' of github.com:e2b-dev/infra into l…
levb abe36c6
chore: auto-commit generated changes
github-actions[bot] cf896dd
refactor: use atomic.Pointer for parsed ACLs, lock-free hot path
levb 93e1382
Merge branch 'lev-ingress-control' of github.com:e2b-dev/infra into l…
levb 3be037c
refactor: use pointer-to-atomic for parsed ACLs, avoid copylocks
levb 8165cf6
fix: add blank line before return to satisfy nlreturn linter
levb 15eccf1
refactor: revert egress to allow-deny API, add structured ingress proto
levb a503ab1
Merge branch 'main' of github.com:e2b-dev/infra into lev-allow-deny-d…
levb 80248a2
Merge branch 'lev-allow-deny-dynamic' into lev-ingress-control
levb 4c8c701
revert unrelated assert→require changes in test files
levb 2ba87a5
Merge branch 'main' of github.com:e2b-dev/infra into lev-ingress-control
levb 50a1fde
refactor(tests): rename network test helpers to use In/Out convention
levb 6c007a8
refactor(tests): rename ptrS, reduce sandbox timeout, use In/Out naming
levb cc5b856
chore: auto-commit generated changes
github-actions[bot] e583335
fix: restore bare IP support in network rules (backwards compat)
levb 2213a7b
Merge branch 'lev-ingress-control' of github.com:e2b-dev/infra into l…
levb 3c6adf8
test: add missing egress test cases from main
levb 928205b
refactor(tests): restore _out_test.go from main, slim _update_test.go
levb 0952f3f
docs: shorten OpenAPI descriptions, remove egress port references
levb 5860b9a
refactor: pre-parsed ACLs, reject egress ports, simplify rule parsing
levb 3ba34b6
refactor(tests): rename getHost to echoHost
levb e363fb6
refactor(tests): inline sandbox.NewConfig in server tests
levb 0f24c07
Merge branch 'main' of github.com:e2b-dev/infra into lev-ingress-control
levb 4d045b3
Merge branch 'main' of github.com:e2b-dev/infra into lev-ingress-control
levb 8539142
fix: CI failures — remove unused error return, fix IPv6 ingress test
levb a8a5dce
refactor: match main's style for block-all checks in validation
levb 3cec4f8
chore: auto-commit generated changes
github-actions[bot] 1cfef7b
revert unrelated assert→require changes in sandbox_create_test.go
levb 930993c
Merge branch 'lev-ingress-control' of github.com:e2b-dev/infra into l…
levb 7966963
chore: auto-commit generated changes
github-actions[bot] bb97a11
refactor: buildEgressConfig takes egressUpdate, restore main's naming
levb fefb093
fix: preserve allowPublicAccess during network config updates
levb e15260f
revert cosmetic test changes in smoketest and nfsproxy
levb d56f3c8
cleanup: revert cosmetic changes, drop impossible-data tests
levb 80a8752
restore comments in firewall.go to match main
levb 31064d4
Update packages/shared/pkg/proxy/template/browser_ingress_denied.html
levb 1f6b41e
Update packages/api/internal/handlers/sandbox_create.go
levb 78d19ba
Merge branch 'main' of github.com:e2b-dev/infra into lev-ingress-control
levb e9b6eee
PR feedback: use a loop var instead of somearray[i]
levb 4670760
PR feedback: renamed ClientIPHeader
levb 6816ae1
Merge branch 'lev-ingress-control' of github.com:e2b-dev/infra into l…
levb cbbf8e6
Drop IPv6 from ingress rules; deny IPv6 clients fail-closed
levb a3b7d49
Restore ParseAddressesAndDomains, inline error message strings in tests
levb 2ad55c6
lint, more IPv6 removed
levb eedb612
PR feedback: clarified some test cases
levb 42983b7
Remove duplicate test cases in sandbox_create_test.go
levb 5c3d9ec
Clean up parseIngressRules and fix update_network field assignment order
levb dc7cea3
Refactor network access control into Egress/Ingress value types
levb 260cd55
Unify egress/ingress proto format to repeated string CIDRs
levb ebfa559
Revert unnecessary openapi description changes, keep PUT definitions …
levb 028b17a
chore: auto-commit generated changes
github-actions[bot] b083d55
Fix ingress tests for IPv6 CI runners
levb f11c720
Merge branch 'lev-ingress-control' of github.com:e2b-dev/infra into l…
levb 09745f4
Restore MatchDomain comment per review
levb 7818793
Update packages/shared/pkg/proxy/errors.go
levb 31a470e
Merge branch 'lev-ingress-control' of github.com:e2b-dev/infra into l…
levb 19516d8
Fix sandboxID/sandboxId param mismatch in NewErrIngressDenied
levb 140439b
Rename AllInternetTrafficCIDR to AllTraffic, use const instead of lit…
levb 005ab5c
Remove proto clone, simplify sandbox config creation
levb 3d2280c
Split ExtractClientIP into ExtractExternalClientIP and ExtractE2BClie…
levb 547cbb7
Merge branch 'main' of github.com:e2b-dev/infra into lev-ingress-control
levb af16ac1
Merge branch 'main' of github.com:e2b-dev/infra into lev-ingress-control
levb efc86b4
Resolve merge conflicts, restore AllInternetTrafficCIDR and ErrMsg co…
levb f84e8f8
Merge remote-tracking branch 'e2b/main' into lev-ingress-control
levb 70e5e3a
Fix MarkRunning call to pass context after main merge
levb 69e1dfc
Tighten curl timeouts in integration tests, use IPs for blocked checks
levb 80eea09
Merge branch 'main' of github.com:e2b-dev/infra into lev-ingress-control
levb bfd9758
chore: auto-commit generated changes
github-actions[bot] 35ae165
Merge remote-tracking branch 'e2b/main' into lev-ingress-control
levb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -82,6 +82,26 @@ func TestValidateNetworkConfig(t *testing.T) { | |
| wantCode int | ||
| wantErrMsg string | ||
| }{ | ||
| // Port syntax rejected for egress | ||
| { | ||
| name: "deny_out with port is rejected", | ||
| network: &api.SandboxNetworkConfig{ | ||
| DenyOut: &[]string{"10.0.0.0/8:22"}, | ||
| }, | ||
| wantErr: true, | ||
| wantCode: http.StatusBadRequest, | ||
| wantErrMsg: `invalid deny out entry "10.0.0.0/8:22": port-specific rules are not supported for egress`, | ||
| }, | ||
| { | ||
| name: "allow_out with port is rejected", | ||
| network: &api.SandboxNetworkConfig{ | ||
| AllowOut: &[]string{"8.8.8.8:80"}, | ||
| }, | ||
| wantErr: true, | ||
| wantCode: http.StatusBadRequest, | ||
| wantErrMsg: `invalid allow out entry "8.8.8.8:80": port-specific rules are not supported for egress`, | ||
| }, | ||
| // Valid configurations | ||
| { | ||
| name: "nil network config is valid", | ||
| network: nil, | ||
|
|
@@ -109,33 +129,6 @@ func TestValidateNetworkConfig(t *testing.T) { | |
| wantErrMsg: "invalid denied CIDR not-a-cidr", | ||
| }, | ||
| // Domain validation tests | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed because these are already covered by the wildcard tests, redundant |
||
| { | ||
| name: "allow_out with domain requires deny_out block-all", | ||
| network: &api.SandboxNetworkConfig{ | ||
| AllowOut: &[]string{"example.com"}, | ||
| }, | ||
| wantErr: true, | ||
| wantCode: http.StatusBadRequest, | ||
| wantErrMsg: ErrMsgDomainsRequireBlockAll, | ||
| }, | ||
| { | ||
| name: "allow_out with domain and block-all deny_out is valid", | ||
| network: &api.SandboxNetworkConfig{ | ||
| AllowOut: &[]string{"example.com"}, | ||
| DenyOut: &[]string{sandbox_network.AllInternetTrafficCIDR}, | ||
| }, | ||
| wantErr: false, | ||
| }, | ||
| { | ||
| name: "allow_out with domain and partial deny_out is invalid", | ||
| network: &api.SandboxNetworkConfig{ | ||
| AllowOut: &[]string{"example.com"}, | ||
| DenyOut: &[]string{"10.0.0.0/8"}, | ||
| }, | ||
| wantErr: true, | ||
| wantCode: http.StatusBadRequest, | ||
| wantErrMsg: ErrMsgDomainsRequireBlockAll, | ||
| }, | ||
| { | ||
| name: "allow_out with wildcard domain requires deny_out block-all", | ||
| network: &api.SandboxNetworkConfig{ | ||
|
|
@@ -241,6 +234,129 @@ func TestValidateNetworkConfig(t *testing.T) { | |
| }, | ||
| wantErr: false, | ||
| }, | ||
| // Ingress port validation tests (unified CIDR:port format) | ||
| { | ||
| name: "valid allowIn with port", | ||
| network: &api.SandboxNetworkConfig{ | ||
| AllowIn: &[]string{"0.0.0.0/0:80", "0.0.0.0/0:443"}, | ||
|
levb marked this conversation as resolved.
|
||
| DenyIn: &[]string{sandbox_network.AllInternetTrafficCIDR}, | ||
| }, | ||
| wantErr: false, | ||
| }, | ||
| { | ||
| name: "valid allowIn with port range", | ||
| network: &api.SandboxNetworkConfig{ | ||
| AllowIn: &[]string{"10.0.0.0/8:80-443"}, | ||
| DenyIn: &[]string{sandbox_network.AllInternetTrafficCIDR}, | ||
| }, | ||
| wantErr: false, | ||
| }, | ||
| { | ||
| name: "valid denyIn with port", | ||
| network: &api.SandboxNetworkConfig{ | ||
| DenyIn: &[]string{"0.0.0.0/0:22", "0.0.0.0/0:3306"}, | ||
| }, | ||
| wantErr: false, | ||
| }, | ||
| { | ||
| name: "valid denyIn port-only shorthand :80 means all IPs port 80", | ||
| network: &api.SandboxNetworkConfig{ | ||
| DenyIn: &[]string{":80"}, | ||
| }, | ||
| wantErr: false, | ||
| }, | ||
| { | ||
| name: "valid denyIn port-range shorthand :80-90 means all IPs ports 80-90", | ||
| network: &api.SandboxNetworkConfig{ | ||
| DenyIn: &[]string{":80-90"}, | ||
| }, | ||
| wantErr: false, | ||
| }, | ||
| { | ||
| name: "valid allowIn port-only shorthand :443 with deny-all", | ||
| network: &api.SandboxNetworkConfig{ | ||
| AllowIn: &[]string{":443"}, | ||
| DenyIn: &[]string{sandbox_network.AllInternetTrafficCIDR}, | ||
| }, | ||
| wantErr: false, | ||
| }, | ||
| // Ingress CIDR validation tests | ||
| { | ||
| name: "valid allowIn CIDR with deny-all", | ||
| network: &api.SandboxNetworkConfig{ | ||
| AllowIn: &[]string{"10.0.0.0/8"}, | ||
| DenyIn: &[]string{sandbox_network.AllInternetTrafficCIDR}, | ||
| }, | ||
| wantErr: false, | ||
| }, | ||
| { | ||
| name: "valid allowIn CIDR from IP with deny-all", | ||
| network: &api.SandboxNetworkConfig{ | ||
| AllowIn: &[]string{"1.2.3.4/32"}, | ||
|
levb marked this conversation as resolved.
|
||
| DenyIn: &[]string{sandbox_network.AllInternetTrafficCIDR}, | ||
| }, | ||
| wantErr: false, | ||
| }, | ||
| { | ||
| name: "valid allowIn bare IP with deny-all", | ||
| network: &api.SandboxNetworkConfig{ | ||
| AllowIn: &[]string{"1.2.3.4"}, | ||
| DenyIn: &[]string{sandbox_network.AllInternetTrafficCIDR}, | ||
| }, | ||
| wantErr: false, | ||
| }, | ||
| { | ||
| name: "valid allowIn bare IP with port and deny-all", | ||
| network: &api.SandboxNetworkConfig{ | ||
| AllowIn: &[]string{"1.2.3.4:80"}, | ||
| DenyIn: &[]string{sandbox_network.AllInternetTrafficCIDR}, | ||
| }, | ||
| wantErr: false, | ||
| }, | ||
| { | ||
| name: "allowIn without deny-all is rejected", | ||
| network: &api.SandboxNetworkConfig{ | ||
| AllowIn: &[]string{"10.0.0.0/8"}, | ||
| }, | ||
| wantErr: true, | ||
| wantCode: http.StatusBadRequest, | ||
| wantErrMsg: ErrMsgAllowInRequiresBlockAll, | ||
| }, | ||
| { | ||
| name: "allowIn with partial denyIn (no deny-all) is rejected", | ||
| network: &api.SandboxNetworkConfig{ | ||
| AllowIn: &[]string{"10.0.0.0/8"}, | ||
| DenyIn: &[]string{"192.168.0.0/16"}, | ||
| }, | ||
| wantErr: true, | ||
| wantCode: http.StatusBadRequest, | ||
| wantErrMsg: ErrMsgAllowInRequiresBlockAll, | ||
| }, | ||
| { | ||
| name: "invalid allowIn entry", | ||
| network: &api.SandboxNetworkConfig{ | ||
| AllowIn: &[]string{"not-a-cidr"}, | ||
| }, | ||
| wantErr: true, | ||
| wantCode: http.StatusBadRequest, | ||
| wantErrMsg: `invalid allow in entry "not-a-cidr": domains are not supported for ingress rules`, | ||
| }, | ||
| { | ||
| name: "valid denyIn CIDR", | ||
| network: &api.SandboxNetworkConfig{ | ||
| DenyIn: &[]string{"192.168.0.0/16"}, | ||
| }, | ||
| wantErr: false, | ||
| }, | ||
| { | ||
| name: "invalid denyIn entry", | ||
| network: &api.SandboxNetworkConfig{ | ||
| DenyIn: &[]string{"bad"}, | ||
| }, | ||
| wantErr: true, | ||
| wantCode: http.StatusBadRequest, | ||
| wantErrMsg: `invalid deny in entry "bad": domains are not supported for ingress rules`, | ||
| }, | ||
| // Mixed domain and CIDR tests | ||
| { | ||
| name: "allow_out with domain and CIDR without deny_out block-all is invalid", | ||
|
|
@@ -260,6 +376,24 @@ func TestValidateNetworkConfig(t *testing.T) { | |
| }, | ||
| wantErr: false, | ||
| }, | ||
| { | ||
| name: "deny_out with domain is rejected", | ||
| network: &api.SandboxNetworkConfig{ | ||
| DenyOut: &[]string{"example.com"}, | ||
| }, | ||
| wantErr: true, | ||
| wantCode: http.StatusBadRequest, | ||
| wantErrMsg: `invalid denied CIDR example.com`, | ||
| }, | ||
| { | ||
| name: "deny_out with invalid port is rejected", | ||
| network: &api.SandboxNetworkConfig{ | ||
| DenyOut: &[]string{"10.0.0.0/8:abc"}, | ||
| }, | ||
| wantErr: true, | ||
| wantCode: http.StatusBadRequest, | ||
| wantErrMsg: `invalid deny out entry "10.0.0.0/8:abc": port-specific rules are not supported for egress`, | ||
| }, | ||
| } | ||
|
|
||
| for _, tt := range tests { | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.