RDR2TLS網(wǎng)絡(luò)服務(wù)
RDR2TLS 是一個(gè) Haskell 網(wǎng)絡(luò)服務(wù)程序,支持從 HTTP 到 HTTPS 上的所有流量的重定向功能。
運(yùn)行此應(yīng)用程序的最簡(jiǎn)單方法是在 Dockerhub 上使用的 Docker 鏡像。
docker pull fpco/rdr2tls docker run -i -t --rm -p 8080:8080 fpco/rdr2tls
該程序在端口 8080 上運(yùn)行。任何到端口 8080 的 HTTP 請(qǐng)求都能重定向到 HTTPS。
% curl -v 'http://localhost:8080/remote/worker?pants=YES' * Hostname was NOT found in DNS cache * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 8080 (#0) > GET /remote/worker?pants=YES HTTP/1.1 > User-Agent: curl/7.38.0 > Host: localhost:8080 > Accept: */* > < HTTP/1.1 301 Moved Permanently < Transfer-Encoding: chunked < Date: Wed, 06 May 2015 00:31:16 GMT * Server Warp/3.0.13 is not blacklisted < Server: Warp/3.0.13 < Location: https://localhost/remote/worker?pants=YES < * Connection #0 to host localhost left intact
評(píng)論
圖片
表情
