3

shadowsocks-service — Rust network library // Lib.rs

 1 year ago
source link: https://lib.rs/crates/shadowsocks-service
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

shadowsocks-service — Rust network library // Lib.rs

30 stable releases

Uses new Rust 2021

1.15.2 Dec 24, 2022
1.14.3 Apr 4, 2022
1.14.2 Mar 22, 2022
1.12.4 Dec 16, 2021
1.10.2 Mar 28, 2021

#563 in Network programming

Download history1106/week @ 2022-09-15829/week @ 2022-09-22888/week @ 2022-09-291329/week @ 2022-10-061119/week @ 2022-10-13766/week @ 2022-10-20901/week @ 2022-10-27929/week @ 2022-11-03744/week @ 2022-11-10725/week @ 2022-11-17875/week @ 2022-11-24797/week @ 2022-12-01747/week @ 2022-12-08719/week @ 2022-12-15607/week @ 2022-12-22687/week @ 2022-12-29

2,914 downloads per month
Used in shadowsocks-rust

MIT license

1MB


23K

SLoC

shadowsocks-service

This is a port of shadowsocks.

shadowsocks is a fast tunnel proxy that helps you bypass firewalls.

Features

  • Local Server

    • SOCKS 5
    • SOCKS 4/4a (local-socks4)
    • HTTP (local-http)
    • Tunnel (local-tunnel)
    • Redir, aka Transparent Proxy (local-redir)
    • DNS (local-dns)
    • Tun (local-tun)
  • Server

  • Manager


lib.rs:

Shadowsocks Service

https://shadowsocks.org/

shadowsocks is a fast tunnel proxy that helps you bypass firewalls.

Usage

Build shadowsocks and you will get at least 2 binaries: sslocal and ssserver

Write your servers in a configuration file. Format is defined in shadowsocks' documentation

For example:

{
   "server": "my_server_ip",
   "server_port": 8388,
   "local_address": "127.0.0.1",
   "local_port": 1080,
   "password": "mypassword",
   "timeout": 300,
   "method": "aes-256-cfb"
}

Save it in file shadowsocks.json and run local proxy server with

cargo run --bin sslocal -- -c shadowsocks.json

Now you can use SOCKS5 protocol to proxy your requests, for example:

curl --socks5-hostname 127.0.0.1:1080 https://www.google.com

On the server side, you can run the server with

cargo run --bin ssserver -- -c shadowsocks.json

Server should use the same configuration file as local, except the listen addresses for servers must be socket addresses.

Of course, you can also use cargo install to install binaries.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK