Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ryanbekhen/nanoproxy

NanoProxy is a lightweight SOCKS5 proxy server written in Go. It is designed to be simple, minimalistic, and easy to use.
https://github.com/ryanbekhen/nanoproxy

go golang proxy socks5

Last synced: 27 days ago
JSON representation

NanoProxy is a lightweight SOCKS5 proxy server written in Go. It is designed to be simple, minimalistic, and easy to use.

Awesome Lists containing this project

README

        

# NanoProxy

![coverage](https://raw.githubusercontent.com/ryanbekhen/nanoproxy/badges/.badges/master/coverage.svg)
[![Go Report Card](https://goreportcard.com/badge/github.com/ryanbekhen/nanoproxy?cache=v1)](https://goreportcard.com/report/github.com/ryanbekhen/nanoproxy)

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.

## Data Flow Through Proxy

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:

```mermaid
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.

## Data Flow Through Proxy with Tor Support

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:

```mermaid
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
```

## Data Flow Through Proxy with HTTP Support

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:

```mermaid
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.

### Features of NanoProxy with Tor:

- **Enhanced Anonymity**: Traffic is routed through multiple Tor nodes, making it difficult to trace the origin of the
request.
- **Automatic IP Rotation**: Changes exit nodes periodically for better anonymity and privacy.
- **Secure Data Transmission**: Encryption between Tor nodes protects data from snooping.

This distinct data flow employing the Tor network ensures that users enjoy increased privacy without compromising on the
flexible functionality of the proxy Server.

### Impact of Using NanoProxy with Tor:

- **High Latency**: Since the traffic must pass through multiple nodes within the Tor network, this can result in
increased latency. This means that the time it takes for requests to reach their destination and for responses to
return to the user may be longer compared to direct or non-Tor proxy connections.
- **Lower Bandwidth Speeds**: The Tor network generally has lower bandwidth speeds compared to direct paths, which can
affect the performance of large data transfers.
- **Connection Stability Limitations**: Due to dynamic routing through various nodes, users might experience more
frequent connection instability.

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.

## Features

NanoProxy provides the following features:

- [x] **SOCKS5 proxy Server.** NanoProxy is a SOCKS5 proxy Server that can be used to proxy network traffic for various
applications.
- [x] **HTTP proxy Server.** NanoProxy can now act as an HTTP proxy Server for forwarding HTTP requests.
- [x] **TOR support.** NanoProxy can be run with Tor support to provide anonymized network traffic (Docker only).
- [x] **IP Rotation with Tor.** NanoProxy allows for IP rotation using the Tor network, providing enhanced anonymity and
privacy by periodically changing exit nodes.
- [ ] **Authentication Management from Dashboard.** Easily manage user authentication settings and credentials via a
comprehensive and user-friendly web dashboard, ensuring secure access to proxy features.
- [ ] **Change IP via API.** Programmatically request IP changes through a robust API, facilitating automated and
dynamic IP management for different use cases.

## Installation

You can easily install NanoProxy using your package manager by adding the official NanoProxy repository.

### Debian and Ubuntu

Add the NanoProxy repository to your source list:

```shell
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:

```shell
sudo apt update
sudo apt install nanoproxy
```

### Red Hat, CentOS, and Fedora

Add the NanoProxy repository configuration:

```shell
sudo tee /etc/yum.repos.d/ryanbekhen.repo <
```

For example, to use the HTTP Proxy with curl and provide authentication, run:

```shell
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

Contributions are welcome! Feel free to open issues and submit pull requests.

## Security

If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

## License

This project is licensed under the MIT License—see the [LICENSE](LICENSE) file for details.