Skip to content

LocalTor: A lightweight SOCKS5 proxy with authentication that lets you share Tor over your local network.

License

Notifications You must be signed in to change notification settings

X-croot/localtor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

localtor

A simple SOCKS5 proxy server that routes your traffic through the Tor network — locally and securely.


image

Features

  • Lightweight and fast SOCKS5 proxy
  • Tor network integration (via local Tor SOCKS5 endpoint)
  • Optional username/password authentication
  • YAML-based configuration
  • CLI flags for overrides
  • Graceful shutdown handling
  • Console and file-based logging (with zap)
  • Clean logging output with color-coded status
  • ASCII banner on startup

Preview

 _        _____ ___________
| |      |_   _|  _  | ___ \
| |  ______| | | | | | |_/ /
| | |______| | | | | |    /
| |____    | | \ \_/ / |\ \
\_____/    \_/  \___/\_| \_|

    GitHub: https://github.com/X-croot

Requirements

  • Go 1.20+
  • Tor must be running locally (default: 127.0.0.1:9050)

Installation

git clone https://github.com/X-croot/localtor.git
cd localtor
go build -o localtor main.go

Usage

With config file (recommended)

  1. Create a config.yaml file:
listen: "127.0.0.1:1080"
tor: "127.0.0.1:9050"
username: "myuser"
password: "mypassword"
log_level: "info"
log_file: "proxy.log"
  1. Start the proxy:
./localtor -config config.yaml

Or with CLI flags

./localtor -listen 127.0.0.1:1080 -tor 127.0.0.1:9050 -username myuser -password mypass

Logging

  • Console output includes timestamps and colored status messages
  • Optional JSON log output to file (define via log_file)

Security

  • Basic username/password auth (optional)
  • Only accessible via specified listen address
  • Does not store credentials or logs sensitive data

Notes

  • Ensure your Tor service is active and listening on the configured port
  • This project is designed for local testing and development use

About

LocalTor: A lightweight SOCKS5 proxy with authentication that lets you share Tor over your local network.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages