"Docker run nginx-forward-proxy"의 두 판 사이의 차이

 
(같은 사용자의 중간 판 3개는 보이지 않습니다)
39번째 줄: 39번째 줄:


==테스트 2==
==테스트 2==
{{소스헤더|http 테스트}}
<syntaxhighlight lang='console'>
testuser@localhost:~$ curl -sI -x http://127.0.0.1:3128 http://www.wtfpl.net/txt/copying/ | head -1
HTTP/1.1 200 OK
testuser@localhost:~$ docker logs proxy -n1
172.18.0.1 - - [29/Aug/2022:08:33:18 +0000] "GET http://www.wtfpl.net/txt/copying/ HTTP/1.1" 200 498 "-" "curl/7.74.0" "-"
</syntaxhighlight>
<syntaxhighlight lang='console'>
<syntaxhighlight lang='console'>
testuser@localhost:~$ curl -sI -x 127.0.0.1:3128 http://github.com/ | head -1
testuser@localhost:~$ curl -sI -x 127.0.0.1:3128 http://github.com/ | head -1
44번째 줄: 51번째 줄:
testuser@localhost:~$ docker logs proxy -n1
testuser@localhost:~$ docker logs proxy -n1
172.18.0.1 - - [29/Aug/2022:08:30:29 +0000] "HEAD http://github.com/ HTTP/1.1" 301 0 "-" "curl/7.74.0" "-"
172.18.0.1 - - [29/Aug/2022:08:30:29 +0000] "HEAD http://github.com/ HTTP/1.1" 301 0 "-" "curl/7.74.0" "-"
</syntaxhighlight>
{{소스헤더|https 테스트}}
<syntaxhighlight lang='console'>
testuser@localhost:~$ curl -sI -x http://127.0.0.1:3128 https://raw.githubusercontent.com/anak10thn/WTFPL/master/LICENSE.txt | head -1
HTTP/1.1 200 Connection Established
testuser@localhost:~$ docker logs proxy -n1
172.18.0.1 - - [29/Aug/2022:08:32:17 +0000] "CONNECT raw.githubusercontent.com:443 HTTP/1.1" 200 4982 "-" "curl/7.74.0" "-"
</syntaxhighlight>
</syntaxhighlight>
<syntaxhighlight lang='console'>
<syntaxhighlight lang='console'>

2022년 8월 29일 (월) 17:36 기준 최신판

1 개요[ | ]

nginx-forward-proxy
docker run nginx-forward-proxy
testuser@localhost:~$ curl -x http://127.0.0.1:3128 http://www.wtfpl.net/txt/copying/
curl: (7) Failed to connect to 127.0.0.1 port 3128: Connection refused
testuser@localhost:~$ docker run -d --name proxy -p 3128:3128 hinata/nginx-forward-proxy:latest
242d7163b9b678f1893edeca4902364bcff70765ce24a890c8079c26abf57235

2 테스트 1[ | ]

http 테스트
testuser@localhost:~$ curl -x http://127.0.0.1:3128 http://www.wtfpl.net/txt/copying/
            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
                    Version 2, December 2004

 Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>

 Everyone is permitted to copy and distribute verbatim or modified
 copies of this license document, and changing it is allowed as long
 as the name is changed.

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. You just DO WHAT THE FUCK YOU WANT TO.
https 테스트
testuser@localhost:~$ curl -sx http://127.0.0.1:3128 https://raw.githubusercontent.com/anak10thn/WTFPL/master/LICENSE.txt | head -1
            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE

3 테스트 2[ | ]

http 테스트
testuser@localhost:~$ curl -sI -x http://127.0.0.1:3128 http://www.wtfpl.net/txt/copying/ | head -1
HTTP/1.1 200 OK
testuser@localhost:~$ docker logs proxy -n1
172.18.0.1 - - [29/Aug/2022:08:33:18 +0000] "GET http://www.wtfpl.net/txt/copying/ HTTP/1.1" 200 498 "-" "curl/7.74.0" "-"
testuser@localhost:~$ curl -sI -x 127.0.0.1:3128 http://github.com/ | head -1
HTTP/1.1 301 Moved Permanently
testuser@localhost:~$ docker logs proxy -n1
172.18.0.1 - - [29/Aug/2022:08:30:29 +0000] "HEAD http://github.com/ HTTP/1.1" 301 0 "-" "curl/7.74.0" "-"
https 테스트
testuser@localhost:~$ curl -sI -x http://127.0.0.1:3128 https://raw.githubusercontent.com/anak10thn/WTFPL/master/LICENSE.txt | head -1
HTTP/1.1 200 Connection Established
testuser@localhost:~$ docker logs proxy -n1
172.18.0.1 - - [29/Aug/2022:08:32:17 +0000] "CONNECT raw.githubusercontent.com:443 HTTP/1.1" 200 4982 "-" "curl/7.74.0" "-"
testuser@localhost:~$ curl -sI -x 127.0.0.1:3128 https://github.com/ | head -1
HTTP/1.1 200 Connection Established
testuser@localhost:~$ docker logs proxy -n1
172.18.0.1 - - [29/Aug/2022:08:31:02 +0000] "CONNECT github.com:443 HTTP/1.1" 200 6144 "-" "curl/7.74.0" "-"

4 같이 보기[ | ]

5 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}