Skip to content

Instantly share code, notes, and snippets.

View danielchc's full-sized avatar
🍋

/dani danielchc

🍋
View GitHub Profile
@danielchc
danielchc / squid.conf
Created June 12, 2018 19:28
Sample Squid remote proxy configuration
acl clients src <IP>
http_access allow clients
http_port 8080
via off
forwarded_for off
follow_x_forwarded_for deny all
request_header_access X-Forwarded-For deny all
header_access X_Forwarded_For deny all
@danielchc
danielchc / testProxy.py
Created June 12, 2018 19:24
Test proxy
from urllib import request as urlrequest
proxy_host = 'ip:port'
url = 'http://www.httpbin.org/ip'
#If returns 2 IP means that X-Forwarded isn't disabled
req = urlrequest.Request(url)
req.set_proxy(proxy_host, 'http')