Giter Site home page Giter Site logo

koblas's Introduction

Koblas

A lightweight SOCKS5 proxy server, written in Rust.

Installation

Cargo

Make sure the current stable release of Rust is installed.

Registry

cargo install koblas

Manual

git clone https://github.com/ynuwenhof/koblas.git
cd koblas
cargo install --path .

Hash passwords by running the following command:

koblas hash "correct-horse-battery-staple"

this will return an Argon2id password hash.

After installing, you can run the server with:

koblas -a 0.0.0.0 --auth -u /path/to/users.toml

this will bind the server to 0.0.0.0:1080.

Docker

Make sure the Docker Engine is installed.

Pull the latest image from the Docker Hub registry with:

docker pull ynuwenhof/koblas:latest

Run the following commands to build the image yourself instead:

git clone https://github.com/ynuwenhof/koblas.git
cd koblas
docker build -t ynuwenhof/koblas:latest .

Hash passwords by running the following command:

docker run -it --rm ynuwenhof/koblas:latest hash "correct-horse-battery-staple"

this will return an Argon2id password hash.

After pulling or building the image, you can run the server with:

docker run -d -p 1080:1080 \
  -v /path/to/users.toml:/etc/koblas/users.toml \
  -e RUST_LOG=debug \
  -e KOBLAS_NO_AUTHENTICATION=false \
  -e KOBLAS_ANONYMIZE=false \
  --name koblas ynuwenhof/koblas:latest

this will bind the server to 0.0.0.0:1080.

Configuration

Koblas can be configured via environment variables or command line arguments.

Missing keys will fall back to their default value.

Key Description Default
KOBLAS_ADDRESS Address on which to listen for incoming TCP connections 127.0.0.1
KOBLAS_PORT Port on which to listen for incoming TCP connections 1080
KOBLAS_LIMIT Maximum amount of clients to handle at once 255
KOBLAS_NO_AUTHENTICATION Don't require clients to authenticate using a username/password combination false
KOBLAS_ANONYMIZATION Exclude sensitive information from the logs false
KOBLAS_USERS_PATH File path to the list of existing users None

โš ๏ธ The default configuration requires everyone to connect with a pre-existing username/password combination.

Koblas doesn't have a default users file location, but we recommend the following locations:

  • Linux: /etc/koblas/users.toml
  • MacOS: /etc/koblas/users.toml
  • Windows: %ProgramData%\koblas\users.toml

Example

[users]
# Username = "alice", password = "QDuMGlxdhpZt"
alice = "$argon2id$v=19$m=8,t=2,p=1$bWUwSXl2M2pYNU9xcVBocw$f4gFaE7p0qWRKw"
# Username = "bob", password = "ceQvWaDGVeTv"
bob = "$argon2id$v=19$m=8,t=2,p=1$ZExzaTM3aks1WjU1a3g4UA$J+EiueHYuR/dlA"

License

This project is licensed under either of the following licenses, at your option:

koblas's People

Contributors

ynuwenhof avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.