Skip to content
/ Naive Public

A universal networking toolbox supporting several protocols

License

Notifications You must be signed in to change notification settings

hex11/Naive

Repository files navigation

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

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