Giter VIP home page Giter VIP logo

tirofinale's Introduction

tiroFinale

An INEFFICIENT (improved a lot in v2.7 and v4.0 update) and INSECURE (to be improved) Python HTTP(S) proxy

The client-side program (tiro) requires OpenSSL and Python 3.x, and supports at least Windows and Linux.

The server-side program (Finale) requires Python 3.x, and supports at least heroku and MS Azure Web App.

logo

Efficiency

Not using tiroFinale proxy: LOAD: 3.02s

direct

Using tiroFinale proxy (v4.0.02) from localhost: LOAD: 3.32s

with_tf

Server (finale) Setup

  1. Clone the repository, then cd finale
  2. python3 -m pip install -r requirements.txt
  3. vi finale.py and fill in your server's PASSWORD and PORT
  4. python3 ./finale.py

Client (tiro) Setup

You might want Windows binaries for the client: Releases

  1. Clone the repository, then cd tiro
  2. python3 -m pip install -r requirements.txt
  3. vi const.py and fill in your preferences
  4. Add ssl_stuff/tiroFinale_CA.ca.crt to the OS/web-browser CAs as you want
  5. python3 ./tiro_proxy.py

Todo-List

  • Add GUI WebUI support for tiro
  • Fix the Content-Length related bug
  • Improve efficiency
  • Add GFWList support
  • Implement auto-detecting mechanism (Jaô-Shingan™) as a backup of GFWList
  • Use wildcard SSL certificate if possible
  • Proxy auto-configuration on Windows
  • Restore original proxy after exit
  • Concurrent certificate signing
  • Improve security (low priority)

Abandoned Todo Items

  • Network error handling and retransmission (deprecated due to the compatibility concern)
  • Showing statistics (deprecated as it's not so useful and it will probably affect efficiency somehow)

Special thanks to:

tirofinale's People

Contributors

jeffswt avatar xmcp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tirofinale's Issues

tiro's (un)Intelligent Circumvention System is outdated

in the gfwlist.py you should add the following items as for now:

"amazonaws.com",
"github-cloud.amazonaws.com",
"s3.amazonaws.com",

I was wondering if gaiError / getaddrinfo failed Connection aborted was thrown or timeout you could redirect the connection to Finale?

tiro Consumes too much RAM

Possibly due to the memory pool list, tiro consumes memory once reached a new website.

Supposedly, I was wondering if you could add a frequency statistic module and remove infrequent pool indices and thus freeing memory once memory is considerably filling up.

Like I has been using for several days and it flew up to about 200MB...

Don't tell me to restart tiro!

Unhandled connection reset error (reopened)

Try this link, it causes invalidity every time.

Using tiroFinale v5.5. It might occur again.

http://ohmwrite.com/fp.eng?id=5ff0fb62-0643-4ff1-aaee-c737f9ffc0e0&rand=57051&ver=asynch&time=-480&referrerUrl=http%3A%2F%2Fwww.planetminecraft.com%2Fproject%2Felden---modern-house%2F&subId=&abr=true&res=1024x819&stdTime=480&fpe=3&curl=http%3A%2F%2Fwww.mediafire.com%2Fdownload%2F4atg1627oggg2cb%2FElden%2B-%2BModern%2BHouse.rar&hosted=true

Traceback (most recent call last):
  File "C:\Programs\Python3\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 385, in _make_request
    httplib_response = conn.getresponse(buffering=True)
TypeError: getresponse() got an unexpected keyword argument 'buffering'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Programs\Python3\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 578, in urlopen
    chunked=chunked)
  File "C:\Programs\Python3\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 387, in _make_request
    httplib_response = conn.getresponse()
  File "C:\Programs\Python3\lib\http\client.py", line 1174, in getresponse
    response.begin()
  File "C:\Programs\Python3\lib\http\client.py", line 282, in begin
    version, status, reason = self._read_status()
  File "C:\Programs\Python3\lib\http\client.py", line 243, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "C:\Programs\Python3\lib\socket.py", line 575, in readinto
    return self._sock.recv_into(b)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Programs\Python3\lib\site-packages\requests\adapters.py", line 403, in send
    timeout=timeout
  File "C:\Programs\Python3\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 623, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "C:\Programs\Python3\lib\site-packages\requests\packages\urllib3\util\retry.py", line 255, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "C:\Programs\Python3\lib\site-packages\requests\packages\urllib3\packages\six.py", line 309, in reraise
    raise value.with_traceback(tb)
  File "C:\Programs\Python3\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 578, in urlopen
    chunked=chunked)
  File "C:\Programs\Python3\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 387, in _make_request
    httplib_response = conn.getresponse()
  File "C:\Programs\Python3\lib\http\client.py", line 1174, in getresponse
    response.begin()
  File "C:\Programs\Python3\lib\http\client.py", line 282, in begin
    version, status, reason = self._read_status()
  File "C:\Programs\Python3\lib\http\client.py", line 243, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "C:\Programs\Python3\lib\socket.py", line 575, in readinto
    return self._sock.recv_into(b)
requests.packages.urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Programs\tiro\finale_launcher.py", line 112, in tornado_fetcher
    with finale_request(method, url, headers, body) as res:
  File "C:\Programs\tiro\finale_launcher.py", line 100, in finale_request
    return _direct_request(method, url, headers, body)
  File "C:\Programs\tiro\finale_launcher.py", line 72, in _direct_request
    stream=True, allow_redirects=False, timeout=const.TIMEOUT,
  File "C:\Programs\Python3\lib\site-packages\requests\sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Programs\Python3\lib\site-packages\requests\sessions.py", line 585, in send
    r = adapter.send(request, **kwargs)
  File "C:\Programs\Python3\lib\site-packages\requests\adapters.py", line 453, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))

getresponse() got an unexpected keyword

tiro causes 'buffering' error.

Wonder what caused it...

Traceback (most recent call last):
  File "C:\Programs\Python3\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 385, in _make_request
    httplib_response = conn.getresponse(buffering=True)
TypeError: getresponse() got an unexpected keyword argument 'buffering'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Programs\Python3\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 578, in urlopen
    chunked=chunked)
  File "C:\Programs\Python3\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 387, in _make_request
    httplib_response = conn.getresponse()
  File "C:\Programs\Python3\lib\http\client.py", line 1174, in getresponse
    response.begin()
  File "C:\Programs\Python3\lib\http\client.py", line 282, in begin
    version, status, reason = self._read_status()
  File "C:\Programs\Python3\lib\http\client.py", line 251, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Programs\Python3\lib\site-packages\requests\adapters.py", line 403, in send
    timeout=timeout
  File "C:\Programs\Python3\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 623, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "C:\Programs\Python3\lib\site-packages\requests\packages\urllib3\util\retry.py", line 255, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "C:\Programs\Python3\lib\site-packages\requests\packages\urllib3\packages\six.py", line 309, in reraise
    raise value.with_traceback(tb)
  File "C:\Programs\Python3\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 578, in urlopen
    chunked=chunked)
  File "C:\Programs\Python3\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 387, in _make_request
    httplib_response = conn.getresponse()
  File "C:\Programs\Python3\lib\http\client.py", line 1174, in getresponse
    response.begin()
  File "C:\Programs\Python3\lib\http\client.py", line 282, in begin
    version, status, reason = self._read_status()
  File "C:\Programs\Python3\lib\http\client.py", line 251, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
requests.packages.urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Programs\tiro\finale_launcher.py", line 112, in tornado_fetcher
    with finale_request(method, url, headers, body) as res:
  File "C:\Programs\tiro\finale_launcher.py", line 100, in finale_request
    return _direct_request(method, url, headers, body)
  File "C:\Programs\tiro\finale_launcher.py", line 72, in _direct_request
    stream=True, allow_redirects=False, timeout=const.TIMEOUT,
  File "C:\Programs\Python3\lib\site-packages\requests\sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Programs\Python3\lib\site-packages\requests\sessions.py", line 585, in send
    r = adapter.send(request, **kwargs)
  File "C:\Programs\Python3\lib\site-packages\requests\adapters.py", line 453, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))

tiro Doesn't work on some websites

Some websites seems not to work when using tiro[Direct].
These are a few websites known not to work:

Look forward to solve these issues!

tiro Doesn't work on some websites

Still doesn't work on GitHub when uploading releases. You did fix error #1... didn't you! Strange...

XMLHttpRequest cannot load https://github-cloud.s3.amazonaws.com/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://github.com' is therefore not allowed access. The response had HTTP status code 504.

tirofinaleerror504

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.