Naive

A universal networking toolbox supporting several protocols

9
2
C#

The NaiveSocks with Related Projects

NaiveSocks is an all-in-one networking tool operating at the transport layer.

It can serve as proxy server/client, port forwarder, DNS server/client, HTTP file server and more…

Build Status

Appveyor build status
Appveyor build status
Docker Cloud Build Status

GitHub Releases

Feature & Future

  • [x] Interactive CLI
  • [x] Configuration file using TOML
  • [ ] Documentation / tutorials
  • [x] Supported protocols
    • [x] ‘direct’ (in/out)
    • [x] ‘socks5’ (in/out)
    • [x] ‘http’ (in/out)
    • [x] ‘tlssni’ (in)
    • [x] ‘ss’ (in/out)
    • [x] ‘naive’ (in/out)
      • [x] Multiplexing (for 0-RTT handshake) and optional inversed multiplexing (for bandwidth)
      • [x] Optional compression
  • [x] ‘dns’ - simple DNS server (UDP) and client (UDP/DoH)
  • [x] ‘router’
    • [x] ABP Filter support
    • [x] Auto download ABP Filters from URL
  • [x] Web server
    • [x] “Virtual host” / path rules support
    • [x] ‘webfile’ - Static website / file server
    • [x] ‘webauth’ - Basic HTTP authentication
    • [x] ‘webcon’ - Web console
  • [x] Linux
    • [x] Async socket implementation using epoll
    • [x] ‘tproxy’ (in) - Transparent proxy support
  • [x] Android
    • [x] UI: Status / Adapters / Connections / Log / Console
    • [x] Simple text configuration editor
    • [x] VpnService implementation using tun2socks
    • [ ] Configuration management UI
  • [ ] Windows
    • [x] UI: Connections / Log / Console
    • [ ] Systray
    • [ ] Configuration management UI
  • [ ] UDP support
    • [ ] ‘direct’
    • [ ] ‘socks5’
    • [ ] ‘naive’

Download & Run

Download from
GitHub Releases
or
Latest build on Appveyor

.NET Framework (4.5.1 or above) / Mono

Run NaiveSocks.exe in NaiveSocks_net45.zip/tar.gz or NaiveSocks_SingleFile.exe.

.NET Core (3.1 or above)

Run run.sh or run.bat in NaiveSocks_dotnetcore.zip/tar.gz.

Linux (with bundled runtime)

Install the latest stable version that bundled with .NET Core runtime for Linux x64:

nsocks_pack="https://github.com/hex11/Naive/releases/latest/download/NaiveSocks_dotnetcore_linux-x64.tar.gz" \
  wget $nsocks_pack -O nsocks.tar.gz \
  && sudo tar xvf nsocks.tar.gz -C /opt/nsocks/ && sudo sh /opt/nsocks/install.sh

Linux

Ensure that the required .NET Core runtime is installed.

Install the latest stable version:

nsocks_pack="https://github.com/hex11/Naive/releases/latest/download/NaiveSocks_dotnetcore.tar.gz" \
# ...

Install the latest dev version:

nsocks_pack="https://ci.appveyor.com/api/projects/hex11/Naive/artifacts/bin%2Fupload%2FNaiveSocks_dotnetcore.tar.gz" \
# ...

Android

Install NaiveSocksAndroid.apk and run.

Docker

docker run -it --network host -v $(pwd)/config:/app/config hex0011/naivesocks

Configuration

See NaiveSocks/naivesocks-example.tml for example.

Configuration Paths

NaiveSocks finds the configuration file in the following paths, if no path specified by the command line argument -c.

  • [Current working folder]/naivesocks.tml
  • [Program folder]/config/naivesocks.tml
  • [Program folder]/naivesocks.tml
  • [User folder]/.config/nsocks/naivesocks.tml
  • [User folder]/.config/naivesocks.tml
  • [User AppData folder]/nsocks/naivesocks.tml
  • [User AppData folder]/naivesocks.tml
  • [User folder]/nsocks/naivesocks.tml
  • [User folder]/naivesocks.tml

Related Projects

NaiveSvrLib: HTTP server implementation and socket helpers

NaiveZip: A simple archiver that can bundle .NET Framework apps into a single excutable.

Nett: A customized fork of the TOML library Nett