Follow-up to the previous commit on this branch: - Rename Config.GetDomainFrontingIP -> GetDomainFrontingHost. The helper now returns a hostname or an IP, so the old name was a lie. Drop the unused defaultValue net.IP parameter (every caller passed nil). Update internal/cli/run_proxy.go and internal/cli/doctor.go; rename the misleading `ip` local var in doctor.go to `override`. - Add TOML fixtures (domain_fronting_host.toml, domain_fronting_ip.toml) so the new field is exercised through the actual Parse()->JSON->Config path users hit, not just via direct .Set() calls. Plus a positive backward-compat test confirming an `ip`-only legacy config still validates and resolves correctly, and a no-fronting test confirming the unset case returns empty. - Clarify example.config.toml: `ip` is kept for backward compatibility, not because it has stricter validation semantics worth choosing over `host`. mtglib.ProxyOpts.DomainFrontingIP keeps its name (public API).pull/480/head
|
|
||
| 116 |
|
116 |
|
| 117 |
|
117 |
|
| 118 |
|
118 |
|
| 119 |
|
|
|
| 120 |
|
|
|
| 121 |
|
|
|
| 122 |
|
|
|
|
119 |
|
|
|
120 |
|
|
|
121 |
|
|
|
122 |
|
|
| 123 |
|
123 |
|
| 124 |
|
124 |
|
| 125 |
|
125 |
|
|
|
||
| 298 |
|
298 |
|
| 299 |
|
299 |
|
| 300 |
|
300 |
|
| 301 |
|
|
|
| 302 |
|
|
|
|
301 |
|
|
|
302 |
|
|
| 303 |
|
303 |
|
| 304 |
|
304 |
|
| 305 |
|
305 |
|
|
|
||
| 343 |
|
343 |
|
| 344 |
|
344 |
|
| 345 |
|
345 |
|
| 346 |
|
|
|
|
346 |
|
|
| 347 |
|
347 |
|
| 348 |
|
348 |
|
| 349 |
|
349 |
|
|
|
||
| 4 |
|
4 |
|
| 5 |
|
5 |
|
| 6 |
|
6 |
|
| 7 |
|
|
|
| 8 |
|
7 |
|
| 9 |
|
8 |
|
| 10 |
|
9 |
|
|
|
||
| 118 |
|
117 |
|
| 119 |
|
118 |
|
| 120 |
|
119 |
|
| 121 |
|
|
|
|
120 |
|
|
| 122 |
|
121 |
|
| 123 |
|
122 |
|
| 124 |
|
123 |
|
| 125 |
|
124 |
|
| 126 |
|
125 |
|
| 127 |
|
126 |
|
| 128 |
|
|
|
|
127 |
|
|
| 129 |
|
128 |
|
| 130 |
|
129 |
|
| 131 |
|
130 |
|
|
|
||
| 74 |
|
74 |
|
| 75 |
|
75 |
|
| 76 |
|
76 |
|
| 77 |
|
|
|
|
77 |
|
|
| 78 |
|
78 |
|
| 79 |
|
79 |
|
| 80 |
|
80 |
|
| 81 |
|
81 |
|
| 82 |
|
82 |
|
| 83 |
|
83 |
|
|
84 |
|
|
| 84 |
|
85 |
|
| 85 |
|
|
|
|
86 |
|
|
|
87 |
|
|
|
88 |
|
|
|
89 |
|
|
|
90 |
|
|
|
91 |
|
|
|
92 |
|
|
|
93 |
|
|
|
94 |
|
|
|
95 |
|
|
|
96 |
|
|
|
97 |
|
|
|
98 |
|
|
|
99 |
|
|
|
100 |
|
|
|
101 |
|
|
|
102 |
|
|
|
103 |
|
|
|
104 |
|
|
| 86 |
|
105 |
|
| 87 |
|
106 |
|
| 88 |
|
107 |
|
|
|
||
|
1 |
|
|
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
||
|
1 |
|
|
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|