Skip to main content

TorNet v2.0.2

TorNet Banner Python License Platform

Automate IP address changes using Tor network with advanced features

TorNet is a Python package that automates IP address changes using Tor. It is a top tool for securing your networks by frequently changing your IP address, making it difficult for trackers to pinpoint your location.


Benefits

  • Enhanced Privacy: By regularly changing your IP address, TorNet makes it much harder for websites and trackers to monitor your online activity.
  • Increased Security: Frequent IP changes can help protect you from targeted attacks and make it more difficult for malicious actors to track your online presence.
  • Anonymity: Using Tor, TorNet helps you maintain a high level of anonymity while browsing the internet.
  • Ease of Use: TorNet is designed to be simple and easy to use, whether you prefer command-line tools or integrating it directly into your Python scripts.
  • Protection from Tracking: With your IP address changing frequently, tracking services and advertisers will find it more challenging to build a profile on you.
  • Peace of Mind: Knowing that your IP address is regularly changed can give you confidence in your online privacy and security.

Table of Contents


Features

  • Automatic IP Rotation - Change your IP address at regular intervals
  • Country Selection - Choose exit nodes from specific countries
  • Kill Switch - Block all non-Tor traffic for maximum privacy
  • DNS Leak Test - Verify your anonymity setup
  • Auto-Fix - Automatic dependency installation
  • Status Monitoring - Real-time system status display
  • Logging - Detailed log file with follow capability
  • Configurable - Custom configuration via YAML/JSON files
  • Scheduling - Flexible scheduling options (seconds, minutes, hours, days)

Installation

pip install tornet==2.0.1

Quick Start

Basic Usage

# Display current IP address
tornet --ip

# Change IP once
tornet --change

# Change IP every 60 seconds, 10 times
tornet --interval 60 --count 10

# Change IP indefinitely every 30-120 seconds (random interval)
tornet --interval 30-120 --count 0

tornet --status  

Start with Country Selection

# Use US exit nodes, change IP every minute
tornet --country us --interval 60

# Use German exit nodes
tornet --country de --interval 120

# Use random countries (default)
tornet --country auto --interval 60

Commands

Basic Commands

Command Description Example
--ip Display current IP address tornet --ip
--change Change IP once and exit tornet --change
--interval Time between changes (seconds or range) tornet --interval 30
--count Number of IP changes (0 = infinite) tornet --count 20
--stop Stop all Tor services tornet --stop
--version Show version tornet --version

Advanced Commands

Command Description Example
--status Show system status tornet --status
--country Specify exit country tornet --country jp
--schedule Schedule IP changes tornet --schedule 5m
--dns-leak-test Test for DNS leaks tornet --dns-leak-test
--kill-switch Toggle kill switch tornet --kill-switch
--log --follow View/follow logs tornet --log --follow
--json JSON output format tornet --ip --json
--config Use custom config tornet --config myconfig.yml
--auto-fix Auto-install dependencies tornet --auto-fix
--list-countries List country codes tornet --list-countries
--restore-default Restore default config tornet --restore-default

Schedule Formats

  • 30s - Every 30 seconds
  • 5m - Every 5 minutes
  • 2h - Every 2 hours
  • 1d - Every 1 day

Interval Formats

  • 60 - Exactly 60 seconds
  • 30-120 - Random between 30 and 120 seconds

Country Selection

List Available Countries

tornet --list-countries

Available Country Codes

US - United States        DE - Germany          JP - Japan
GB - United Kingdom       FR - France           CA - Canada
AU - Australia            NL - Netherlands      SE - Sweden
CH - Switzerland          NO - Norway           DK - Denmark
FI - Finland              RU - Russia           CN - China
IN - India                BR - Brazil           MX - Mexico
ZA - South Africa         SG - Singapore        HK - Hong Kong
TW - Taiwan               IT - Italy            ES - Spain

Using Country Selection

# Use specific country
tornet --country us --interval 60

# Use random countries (default)
tornet --country auto --interval 60

# Restore to default configuration
tornet --restore-default

Configuration

Configuration File

TorNet uses ~/.tornet/config.yml by default. Create a custom configuration:

# ~/.tornet/custom.yml
default:
  interval: 60
  count: 0
  country: auto
  schedule: null

network:
  proxy_port: 9050
  dns_port: 53
  control_port: 9051

security:
  kill_switch: false
  dns_protection: true
  log_level: info

advanced:
  max_retries: 3
  timeout: 30
  verify_ssl: true

Using Custom Config

tornet --config ~/.tornet/custom.yml --interval 120

Advanced Usage

Kill Switch

# Enable kill switch (requires root)
sudo tornet --kill-switch

# Disable kill switch
sudo tornet --kill-switch

DNS Leak Testing

tornet --dns-leak-test

Log Management

tornet --log
tornet --log --follow

JSON Output

tornet --ip --json
tornet --change --json

Complete Example

tornet --country us --interval 120-300 --count 50
tornet --country de --schedule 1h
tornet --config custom.yml --json --interval 30 --count 100

Troubleshooting

Common Issues

  1. Permission Denied Errors
sudo tornet --kill-switch
  1. Tor Not Starting
which tor
sudo systemctl start tor
# or
sudo service tor start
  1. Dependency Issues
tornet --auto-fix
python3 -c "import requests"
tor --version
  1. Connection Issues
curl -s https://api.ipify.org
curl --socks5 127.0.0.1:9050 https://api.ipify.org

Log Files

  • TorNet Logs: ~/.tornet/tornet.log
  • Tor Configuration: ~/.tornet/torrc.custom
  • Country Settings: ~/.tornet/current_country

Status Information

tornet --status

Configuring Your Browser to Use TorNet

Firefox:

  1. Go to Preferences > General > Network Settings.
  2. Select Manual proxy configuration.
  3. Enter 127.0.0.1 for SOCKS Host and 9050 for the Port.
  4. Check Proxy DNS when using SOCKS v5.
  5. Click OK.
Firefox Configuration Example

Disclaimer

TorNet is intended for educational and privacy purposes only.

Important Notes:

  1. Legal compliance
  2. Terms of service
  3. Responsible use
  4. No warranty
  5. Privacy
  6. Security

Ethical Guidelines:

  • Use for privacy protection and security testing
  • Respect network resources
  • Avoid excessive requests
  • Obtain proper authorization before testing

Limitations:

  • Tor exit nodes may be blocked
  • Slower connection speed
  • Some features require root
  • Not all countries have reliable Tor exit nodes

Contributing

Contributions are welcome! Submit a Pull Request.


License

MIT License - see LICENSE file.


Author

Thanks to all contributors:


Mr-Fidal

GH05T-HUNTER5

Support

  • Give a star ⭐
  • Report issues
  • Suggest features
  • Share with others

Acknowledgements

Thanks to the Tor project developers.


Made with ❤️ for the privacy-conscious community

Metadata

Release files for tornet 2.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tornet 2.0.2
File Size Uploaded Provenance Actions
tornet-2.0.2.tar.gz 18.4 kB Without provenance Details for tornet-2.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tornet 2.0.2
File Interpreter ABI Platform Actions
tornet-2.0.2-py3-none-any.whl Python 3 none any Details for tornet-2.0.2-py3-none-any.whl

Total release size: 33.9 kB

Release files / tornet-2.0.2.tar.gz

Download URL tornet-2.0.2.tar.gz
Size 18.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3c7f49d7e8fc879f6aab5dfb05895f3a05453d06c7602b7ae37626ff7bec1be7
BLAKE2b-256 checksum
How to use checksums
cd6804917763683fb13e92292a52797fce797f9656c6809dd3e009f85d2c52e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / tornet-2.0.2-py3-none-any.whl

Download URL tornet-2.0.2-py3-none-any.whl
Size 15.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33402ea26cd2a2bdfbf4a9cc14c3184916d33437599e46aa249f1bc4312e6a19
BLAKE2b-256 checksum
How to use checksums
031989242710e5b2968f083fea78b51424a43e888bc600be3614bb0f641c564c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Security for tornet 2.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page