This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# nginx config for A+ SSL Labs rating as of 9-2014 | |
# Broad legacy compatibility including IE8/XP, Android 2.3+, openssl 0.9.8 clients | |
# Blocks most bot scans IP probes. | |
# | |
# *** Assumes: _HOSTNAME_ is replaced *** | |
# | |
# Includes OCSP stapling, HSTS Strict Transport security, | |
# session resumption, legacy backwards compatibility (XP, Android 2.3-4.3) | |
# | |
# Requires nginx 1.6.x. See: http://nginx.org/en/linux_packages.html, e.g.: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# requires socksify gem | |
require "socksify" | |
require 'socksify/http' | |
#updated to work with latest Faraday | |
class Faraday::Adapter::NetHttp | |
def net_http_connection(env) | |
if proxy = env[:request][:proxy] | |
Net::HTTP::Proxy(proxy[:uri].host, proxy[:uri].port, proxy[:user], proxy[:password]) | |
else |