From b4406895f8e945ca45b963ac1f0514cc4b1e1dc0 Mon Sep 17 00:00:00 2001 From: Nekmo Date: Sat, 9 Dec 2017 20:49:00 +0100 Subject: [PATCH 1/2] Setup.py --- forcediphttpsadapter/__init__.py | 1 + .../adapters.py | 0 setup.py | 50 +++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 forcediphttpsadapter/__init__.py rename adapters.py => forcediphttpsadapter/adapters.py (100%) create mode 100644 setup.py diff --git a/forcediphttpsadapter/__init__.py b/forcediphttpsadapter/__init__.py new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/forcediphttpsadapter/__init__.py @@ -0,0 +1 @@ + diff --git a/adapters.py b/forcediphttpsadapter/adapters.py similarity index 100% rename from adapters.py rename to forcediphttpsadapter/adapters.py diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..d223da5 --- /dev/null +++ b/setup.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python + +""" +This module implements a set of requests TransportAdapter, PoolManager, ConnectionPool and +HTTPSConnection with one goal only: + +to use a specific IP address when connecting via SSL to a web service without running into SNI trouble. +The usual technique to force an IP address on an HTTP connection with Requests is +(assuming I want http://example.com/some/path on IP 1.2.3.4): + +requests.get("http://1.2.3.4/some/path", headers={'Host': 'example.com'}) +this is useful if I want to specifically test how 1.2.3.4 is responding; +for instance, if example.com is DNS round-robined to several IP addresses +and I want to hit one of them specifically. +""" +from setuptools import setup, find_packages + + +PACKAGE_NAME = 'forcediphttpsadapter' +PACKAGE_VERSION = '1.0.0' +AUTHOR = 'Roadmaster' +EMAIL = 'your@email' +URL = 'https://github.com/Roadmaster/forcediphttpsadapter' + + +setup( + name=PACKAGE_NAME, + version=PACKAGE_VERSION, + description=__doc__, + author=AUTHOR, + author_email=EMAIL, + url=URL, + # classifiers=CLASSIFIERS, + # platforms=PLATFORMS, + provides=['adapters'], + install_requires=['requests'], + # dependency_links=dependency_links, + + packages=find_packages(), + # include_package_data=True, + # package_data=package_data, + + download_url='{}/archive/master.zip'.format(URL), + # keywords=KEYWORDS, + # scripts=scripts, + + # entry_points={}, + + zip_safe=False, +) From 68815d50f11c168763244a8166ffd7974dfe8af5 Mon Sep 17 00:00:00 2001 From: Daniel Manrique Date: Wed, 13 Dec 2017 10:06:52 -0500 Subject: [PATCH 2/2] Slight fixes to setup.py --- setup.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index d223da5..efc6bd7 100644 --- a/setup.py +++ b/setup.py @@ -1,14 +1,16 @@ #!/usr/bin/env python """ -This module implements a set of requests TransportAdapter, PoolManager, ConnectionPool and -HTTPSConnection with one goal only: +This module implements a set of requests TransportAdapter, PoolManager, +ConnectionPool and HTTPSConnection with one goal only: -to use a specific IP address when connecting via SSL to a web service without running into SNI trouble. -The usual technique to force an IP address on an HTTP connection with Requests is -(assuming I want http://example.com/some/path on IP 1.2.3.4): +to use a specific IP address when connecting via SSL to a web service without +running into SNI trouble. The usual technique to force an IP address on an +HTTP connection with Requests is (assuming I want http://example.com/some/path +on IP 1.2.3.4): requests.get("http://1.2.3.4/some/path", headers={'Host': 'example.com'}) + this is useful if I want to specifically test how 1.2.3.4 is responding; for instance, if example.com is DNS round-robined to several IP addresses and I want to hit one of them specifically. @@ -19,7 +21,7 @@ PACKAGE_NAME = 'forcediphttpsadapter' PACKAGE_VERSION = '1.0.0' AUTHOR = 'Roadmaster' -EMAIL = 'your@email' +EMAIL = 'daniel@tomechangosubanana.com' URL = 'https://github.com/Roadmaster/forcediphttpsadapter'