winget install --id=ryanbekhen.nanoproxy -e
Simple Socks5 Proxy written in Go
Note: This code includes modifications from the original go-socks5 project (https://github.com/armon/go-socks5) Modifications have been made as part of maintenance for NanoProxy. This version is licensed under the MIT license.
NanoProxy is a lightweight proxy server written in Go. It supports both SOCKS5 and HTTP Proxy protocols, making it flexible for proxying various types of network traffic. NanoProxy is designed to be simple, minimalistic, and easy to use. It can be run as a standalone service or as a Docker container.
> ⚠️ Notice: NanoProxy is currently in pre-production stage. While it provides essential proxying capabilities, > please be aware that it is still under active development. Full backward compatibility is not guaranteed until > reaching a stable release. We recommend caution when using NanoProxy for critical production applications. Make sure > to keep an eye on the changelog and be prepared for manual migration steps as the project evolves.
NanoProxy acts as a proxy Server that forwards network traffic between the user and the destination Server. When a user makes a request, the request is sent to the proxy Server. The proxy Server then forwards the request to the destination Server. The destination Server processes the request and responds back to the proxy Server, which then sends the response back to the user. This allows the proxy Server to intercept and manage network traffic effectively.
Here's how the data flows through the proxy:
sequenceDiagram
participant Network
participant Proxy
participant DestinationServer
Network ->> Proxy: Request
Proxy ->> DestinationServer: Forward Request
DestinationServer ->> Proxy: Process & Respond
Proxy ->> Network: Respond
This clear separation of responsibilities helps optimize network communication and enables various proxy-related functionalities.
NanoProxy with Tor adds an extra layer of anonymity and privacy to network traffic by using the Tor network. This enhanced version manages your requests through Tor's decentralized network of nodes, providing better privacy protection.
Here's how the data flows through the proxy when using Tor support:
sequenceDiagram
participant User
participant NanoProxy
participant TorNetwork
participant DestinationServer
User ->> NanoProxy: Request
NanoProxy ->> TorNetwork: Forward Request through Tor
TorNetwork ->> DestinationServer: Request via Exit Node
DestinationServer ->> TorNetwork: Process & Respond
TorNetwork ->> NanoProxy: Response via Entry Node
NanoProxy ->> User: Respond
NanoProxy supports HTTP proxying by handling HTTP requests and forwarding them to the destination server. Depending on the request method (e.g., GET, POST, CONNECT), NanoProxy processes and forwards the request accordingly.
Here's how the data flows through the proxy when using HTTP support:
sequenceDiagram
participant User
participant NanoProxy
participant DestinationServer
User ->> NanoProxy: HTTP Request
NanoProxy ->> DestinationServer: Forward HTTP Request
DestinationServer ->> NanoProxy: Process & Respond
NanoProxy ->> User: Deliver Response
This process allows NanoProxy to act as an intermediary between the client and the destination server for HTTP traffic, ensuring flexibility and traffic management.
This distinct data flow employing the Tor network ensures that users enjoy increased privacy without compromising on the flexible functionality of the proxy Server.
Understanding these impacts allows users to make informed decisions about when and how to use NanoProxy with Tor, especially if anonymity is prioritized over connection speed or stability.
NanoProxy provides the following features:
You can easily install NanoProxy using your package manager by adding the official NanoProxy repository.
Add the NanoProxy repository to your source list:
echo "deb [trusted=yes] https://repo.ryanbekhen.dev/apt/ /" | sudo tee /etc/apt/sources.list.d/ryanbekhen.list
Then, update the package list and install NanoProxy:
sudo apt update
sudo apt install nanoproxy
Add the NanoProxy repository configuration:
sudo tee /etc/yum.repos.d/ryanbekhen.repo <
For example, to use the HTTP Proxy with curl and provide authentication, run:
curl -x http://localhost:8080 -U username:password https://example.com
If authentication fails or is not provided, the proxy will return 407 Proxy Authentication Required
along with the
appropriate Proxy-Authenticate
header.
Contributions are welcome! Feel free to open issues and submit pull requests.
If you discover any security-related issues, please email i@ryanbekhen.dev instead of using the issue tracker.
This project is licensed under the MIT License—see the LICENSE file for details.