Skip to content

Tor Proxy over socks using Python, Stem and Flask

Notifications You must be signed in to change notification settings

0-harshit-0/pro_xy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pro_x-y

Tor Proxy over socks using Python, Stem and Flask

Installation

  • clone the repo
git clone https://github.com/0-harshit-0/pro_xy.git
  • install the necessary python libraries
pip install flask stem requests argparse

Setup

NOTE: in case of windows use 'py' instead of 'python3'

Setting up tor

  • open with default settings (port:65432 & MaxCircuitDirtiness:60)
python3 tor.py
  • opening on windows instad of linux
python3 tor.py -pl 1
  • open with different port (example: port:65000)
python3 tor.py -p 65000
  • open with different dirtiness (example: MaxCircuitDirtiness:30)
python3 tor.py -t 30
  • open with different combinations (example: MaxCircuitDirtiness:30, port:65000, platform:windows)
python3 tor.py -pl 1 -p 65000 -t 30

Setting up Flask(API)

  • start flask application with default port (port:65432)
python3 main.py
  • start flask application with different port (65000)
python3 main.py -p 65000

Usage

TEST: Once the tor and flask application is up and running according to your configs, simply go to http://127.0.0.1:5000/v1/get?url=http://ip-api.com/json/ .If everything is working correctly you should see your tor's IP address info.

http://127.0.0.1:5000/v1/get?url=https://somesite.com/somepath
// js fetch
fetch("http://127.0.0.1:5000/v1/post", {
    method: "post",
    headers: {"content-type": "application/json"},
    body: JSON.stringify({"url": "https://somesite.com/somepath", "body": {"somedata": 1}, "headers": {"Content-Type": "application/json"}})
}).then(async res => {
    console.log(await res.text())
})

In case you are haveing some issues, raise an issue 😜

About

Tor Proxy over socks using Python, Stem and Flask

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages