@@ -44,7 +44,24 @@ describe('caddy', () => {
4444 debug
4545 auto_https disable_redirects
4646 }
47-
47+
48+ :7601 {
49+ root * "/Users/zyb/Library/Application Support/Caddy/pki/authorities/local"
50+ file_server browse
51+ }
52+
53+ # 正向代理配置
54+ :7600 {
55+ bind 0.0.0.0
56+
57+ forward_proxy {
58+ hide_ip
59+ hide_via
60+ acl {
61+ allow all
62+ }
63+ }
64+ }
4865
4966 test-1.abc.com:80 {
5067
@@ -71,7 +88,6 @@ describe('caddy', () => {
7188 }
7289 }
7390 }
74-
7591 "
7692 ` )
7793
@@ -94,7 +110,24 @@ describe('caddy', () => {
94110 debug
95111 auto_https disable_redirects
96112 }
97-
113+
114+ :7601 {
115+ root * "/Users/zyb/Library/Application Support/Caddy/pki/authorities/local"
116+ file_server browse
117+ }
118+
119+ # 正向代理配置
120+ :7600 {
121+ bind 0.0.0.0
122+
123+ forward_proxy {
124+ hide_ip
125+ hide_via
126+ acl {
127+ allow all
128+ }
129+ }
130+ }
98131
99132 test-2.abc.com {
100133 tls internal
@@ -121,7 +154,6 @@ describe('caddy', () => {
121154 }
122155 }
123156 }
124-
125157 "
126158 ` )
127159 await caddy . baseCleanup ( )
@@ -141,7 +173,24 @@ describe('caddy', () => {
141173 debug
142174 auto_https disable_redirects
143175 }
144-
176+
177+ :7601 {
178+ root * "/Users/zyb/Library/Application Support/Caddy/pki/authorities/local"
179+ file_server browse
180+ }
181+
182+ # 正向代理配置
183+ :7600 {
184+ bind 0.0.0.0
185+
186+ forward_proxy {
187+ hide_ip
188+ hide_via
189+ acl {
190+ allow all
191+ }
192+ }
193+ }
145194
146195 test-3.abc.com:80 {
147196
@@ -168,7 +217,6 @@ describe('caddy', () => {
168217 }
169218 }
170219 }
171-
172220 "
173221 ` )
174222
@@ -187,7 +235,24 @@ describe('caddy', () => {
187235 debug
188236 auto_https disable_redirects
189237 }
190-
238+
239+ :7601 {
240+ root * "/Users/zyb/Library/Application Support/Caddy/pki/authorities/local"
241+ file_server browse
242+ }
243+
244+ # 正向代理配置
245+ :7600 {
246+ bind 0.0.0.0
247+
248+ forward_proxy {
249+ hide_ip
250+ hide_via
251+ acl {
252+ allow all
253+ }
254+ }
255+ }
191256
192257 test-3.abc.com:80 {
193258
@@ -215,7 +280,6 @@ describe('caddy', () => {
215280 }
216281 }
217282
218-
219283 test-4.abc.com {
220284 tls internal
221285 reverse_proxy http://127.0.0.1:8080 {
@@ -241,7 +305,6 @@ describe('caddy', () => {
241305 }
242306 }
243307 }
244-
245308 "
246309 ` )
247310
@@ -266,7 +329,24 @@ describe('caddy', () => {
266329 debug
267330 auto_https disable_redirects
268331 }
269-
332+
333+ :7601 {
334+ root * "/Users/zyb/Library/Application Support/Caddy/pki/authorities/local"
335+ file_server browse
336+ }
337+
338+ # 正向代理配置
339+ :7600 {
340+ bind 0.0.0.0
341+
342+ forward_proxy {
343+ hide_ip
344+ hide_via
345+ acl {
346+ allow all
347+ }
348+ }
349+ }
270350
271351 test-2.abc.com {
272352 tls internal
@@ -293,7 +373,6 @@ describe('caddy', () => {
293373 }
294374 }
295375 }
296-
297376 "
298377 ` )
299378
0 commit comments