Commit 3e23e98
authored
feat: improved subdomain-url handling (#211)
* fix: subdomain-url handling
- removed implicit tests based on SubdomainLocalhostGatewayURL
- subdomain tests are now run only against origins defined via
`--subdomain-url`
- DNSLink gateway tests are no longer tied to origin passed via
`--subdomain-url`
* fix(wip): avoid mangling Host header handling
- splitting into subdomain and dnslink gateway variants
- towards avoiding running everything three times
- keep custom Host header when defined
* refactor: remove subdomains from dnslink fixtures
these concepts should not mix, and dnslinks should be testable
independent of --subdomain-url
i also added more useful export format for them, compatible with
IPNS_NS_MAP used by Boxo/Kubo/Rainbow
* refactor: handling Host header vs proxying
towards fixing underlying issue
* feat: make start-kubo-docker
all-in-one command for running local kubo with all fixtures in
* fix: correctly pass subdomain-url to go test
* docs: skip and run examples
* refactor: UnwrapSubdomainTests → proxy-gateway
This replaces magic helpers.UnwrapSubdomainTests with explicit
spec preset named proxy-gateway, which can be enabled/disabled
the same way as other presets.
While it was nice to run every test in both proxy modes,
it was extremely noisy and hard to debug once things went wrong.
By having explicit tests in *_proxy_test.go it is easy to skip them
where proxy functionality is not relevant.
Other:
- Send meaningful User-Agent
- Sent detached path in HTTP Connect proxy tunnel tests (instead of full
URL – in tunnel mode we pretend we talk to remote server on the other
end of tunnel, and not send full URL like it is done in plain proxy
mode)
* docs: fix/improve docker examples
* refactor: require explicit gateway URLs
This is important UX change. We no longer ship with default URLs.
User has to provide explicit one, or the test suite will refuse to run.
This ensures misconfigurations and testing different gateway endpoint
than desired do not happen.
Explicit is better than implicit.1 parent c0dafe1 commit 3e23e98
File tree
28 files changed
+1368
-1055
lines changed- .github/workflows
- cmd/gateway-conformance
- docs
- fixtures
- dir_listing
- redirects_file
- subdomain_gateway
- tests
- tooling
- dnslink
- helpers
- specs
- test
28 files changed
+1368
-1055
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 49 | + | |
54 | 50 | | |
55 | 51 | | |
56 | 52 | | |
| |||
63 | 59 | | |
64 | 60 | | |
65 | 61 | | |
66 | | - | |
| 62 | + | |
67 | 63 | | |
68 | 64 | | |
69 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
| 146 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
7 | 37 | | |
8 | 38 | | |
9 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
11 | | - | |
12 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
| |||
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
25 | | - | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
32 | 49 | | |
33 | 50 | | |
34 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | | - | |
| 75 | + | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
78 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
79 | 84 | | |
80 | 85 | | |
81 | | - | |
82 | | - | |
| 86 | + | |
| 87 | + | |
83 | 88 | | |
84 | | - | |
85 | | - | |
| 89 | + | |
| 90 | + | |
86 | 91 | | |
87 | 92 | | |
88 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
89 | 96 | | |
90 | 97 | | |
91 | 98 | | |
| |||
94 | 101 | | |
95 | 102 | | |
96 | 103 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
113 | 107 | | |
114 | 108 | | |
115 | 109 | | |
| |||
142 | 136 | | |
143 | 137 | | |
144 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
145 | 152 | | |
146 | 153 | | |
147 | 154 | | |
| |||
0 commit comments