配置
{
debug
}
xxxx.test1.xx{
reverse_proxy localhost:8080
}
:80 {
reverse_proxy 127.0.0.1:3180
}
:443 {
reverse_proxy https://127.0.0.1:3443
}
日志
2024/11/10 13:51:58.034 DEBUG events event {"name": "tls_get_certificate", "id": "abe387ea-c094-4795-8b87-1f7abf9090b9", "origin": "tls", "data": {"client_hello":{"CipherSuites":[60138,4865,4866,4867,49195,49199,49196,49200,52393,52392,49171,49172,156,157,47,53],"ServerName":"hello.testdomain.site","SupportedCurves":[43690,25597,29,23,24],"SupportedPoints":"AA==","SignatureSchemes":[1027,2052,1025,1283,2053,1281,2054,1537],"SupportedProtos":["h2","http/1.1"],"SupportedVersions":[2570,772,771],"RemoteAddr":{"IP":"113.255.201.18","Port":32829,"Zone":""},"LocalAddr":{"IP":"10.0.4.45","Port":443,"Zone":""}}}}
2024/11/10 13:51:58.035 DEBUG tls.handshake no matching certificates and no custom selection logic {"identifier": "hello.testdomain.site"}
2024/11/10 13:51:58.035 DEBUG tls.handshake no matching certificates and no custom selection logic {"identifier": "*.testdomain.site"}
2024/11/10 13:51:58.035 DEBUG tls.handshake no matching certificates and no custom selection logic {"identifier": "*.*.site"}
2024/11/10 13:51:58.035 DEBUG tls.handshake no matching certificates and no custom selection logic {"identifier": "*.*.*"}
2024/11/10 13:51:58.035 DEBUG tls.handshake no certificate matching TLS ClientHello {"remote_ip": "113.255.201.18", "remote_port": "32829", "server_name": "hello.testdomain.site", "remote": "113.255.201.18:32829", "identifier": "hello.testdomain.site", "cipher_suites": [60138, 4865, 4866, 4867, 49195, 49199, 49196, 49200, 52393, 52392, 49171, 49172, 156, 157, 47, 53], "cert_cache_fill": 0.0001, "load_or_obtain_if_necessary": true, "on_demand": false}
2024/11/10 13:51:58.035 DEBUG http.stdlib http: TLS handshake error from 113.255.201.18:32829: no certificate available for 'hello.testdomain.site'
2024/11/10 13:51:58.132 DEBUG events event {"name": "tls_get_certificate", "id": "f917c44c-e5af-44ce-9b57-651ebfce3762", "origin": "tls", "data": {"client_hello":{"CipherSuites":[6682,4865,4866,4867,49195,49199,49196,49200,52393,52392,49171,49172,156,157,47,53],"ServerName":"hello.testdomain.site","SupportedCurves":[23130,25597,29,23,24],"SupportedPoints":"AA==","SignatureSchemes":[1027,2052,1025,1283,2053,1281,2054,1537],"SupportedProtos":["h2","http/1.1"],"SupportedVersions":[56026,772,771],"RemoteAddr":{"IP":"113.255.201.18","Port":32830,"Zone":""},"LocalAddr":{"IP":"10.0.4.45","Port":443,"Zone":""}}}}
2024/11/10 13:51:58.132 DEBUG tls.handshake no matching certificates and no custom selection logic {"identifier": "hello.testdomain.site"}
2024/11/10 13:51:58.132 DEBUG tls.handshake no matching certificates and no custom selection logic {"identifier": "*.testdomain.site"}
2024/11/10 13:51:58.132 DEBUG tls.handshake no matching certificates and no custom selection logic {"identifier": "*.*.site"}
2024/11/10 13:51:58.132 DEBUG tls.handshake no matching certificates and no custom selection logic {"identifier": "*.*.*"}
2024/11/10 13:51:58.132 DEBUG tls.handshake no certificate matching TLS ClientHello {"remote_ip": "113.255.201.18", "remote_port": "32830", "server_name": "hello.testdomain.site", "remote": "113.255.201.18:32830", "identifier": "hello.testdomain.site", "cipher_suites": [6682, 4865, 4866, 4867, 49195, 49199, 49196, 49200, 52393, 52392, 49171, 49172, 156, 157, 47, 53], "cert_cache_fill": 0.0001, "load_or_obtain_if_necessary": true, "on_demand": false}
2024/11/10 13:51:58.132 DEBUG http.stdlib http: TLS handshake error from 113.255.201.18:32830: no certificate available for 'hello.testdomain.site'
- 我的想法就是caddy监听80和443,其中test1的网站给8080,其他的给后面默认项
- 首先就是3180和3443端口目前单独访问都正常.但是一旦反代后,80=>3180的正常,后面443的怎么调整都不对,后来就是加了debug日志如上
- 搜了一圈,对于反代来说好像没有什么难度,但是我就是卡在这个443端口反代上了,我的意思就是443端口纯粹中间人,啥都不处理,直接分给其他人让其他人处理数据证书(⊙o⊙)啥的
- 但是目前好像caddy直接给拦截抛出异常了了?连到后面的机会都没有,不知道咋搞了…