Git Product home page Git Product logo

virgild's Introduction

virgild

Easy to use socks(4/4a/5) server.

Current state

  • Full support for socks connection command.
  • Experimental support for tcp bind.
  • Experimental support for udp association.
  • Experimental support for HTTP proxy.
  • User authentication via plain text db.
  • User authentication via sql (odbc too).
  • TLS server.
  • Ability to filter users by subnets.

TODO

  • Web panel for monitoring.
  • Bugs free code.

Installation

From sources

To compile virgild from sources, you'll need golang (https://golang.org/).

git clone https://github.com/swork9/virgild
cd virgild
go get -v
go build -v -tags db_mysql db_odbc db_sqlite db_postgresql
Updating
git pull

Usage

Usage of ./virgild:
  -c string
        Config file to use (default "virgild.conf")

You can also run it as a service, example in virgild.service

cp virgild.service /etc/systemd/system/
systemctl daemon-reload
systemctl --now enable virgild

Authentication methods

Plain text

To configure authentication from plain text file, first change the next section of the configuration file:

[AuthPlainText]
path = plain.db
hashMethod = md5 # sha256, sha512

Next, create a text file in the following format:

key0:value0
key1:value1
key2:value2

Where the key is the username, and the value is its password, hashed by the method you selected in the configuration.

SQL

To configure authentication from sql db, first change the next section of the configuration file:

[AuthSQL]
DBType = mysql
DBConnection = "user:password@tcp(127.0.0.1:3306)/hello"
DBMaxConnections = 8

Next, make sure, that you have table in your db with at least two keys: first for username, second for password. You can use next mysql query to create table:

CREATE TABLE users (username VARCHAR(256) NOT NULL, password VARCHAR(256) NOT NULL, PRIMARY KEY (username));

Check you config file to make sure, that you have working SELECT query to get user:

querySelectUser = "SELECT password FROM users WHERE username=? LIMIT 1;"

This query must return only one value containing the hashed password.

Another

Feel free to open issues and/or submit pull requests, but please wait until I close todo and finish what I want. Thanks!

virgild's People

Contributors

swork9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

briteming rustfox

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.