Code Monkey home page Code Monkey logo

shadowsocks-rust's Introduction

shadowsocks

License Build & Test Build MSRV Build Releases Build Nightly Releases

crates.io Release shadowsocks-rust aur shadowsocks-rust-git NixOS snap shadowsocks-rust homebrew shadowsocks-rust

This is a port of shadowsocks.

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

Library Description
shadowsocks crates.io docs.rs shadowsocks core protocol
shadowsocks-service crates.io docs.rs Services for serving shadowsocks
shadowsocks-rust crates.io Binaries running common shadowsocks services

Related Projects:

Build & Install

Optional Features

  • hickory-dns - Uses hickory-resolver as DNS resolver instead of tokio's builtin.

  • local-http - Allow using HTTP protocol for sslocal

    • local-http-native-tls - Support HTTPS with native-tls

    • local-http-rustls - Support HTTPS with rustls

  • local-tunnel - Allow using tunnel protocol for sslocal

  • local-socks4 - Allow using SOCKS4/4a protocol for sslocal

  • local-redir - Allow using redir (transparent proxy) protocol for sslocal

  • local-dns - Allow using dns protocol for sslocal, serves as a DNS server proxying queries to local or remote DNS servers by ACL rules

  • local-fake-dns - FakeDNS, allocating an IP address for each individual Query from a specific IP pool

  • local-tun - TUN interface support for sslocal

  • local-online-config - SIP008 Online Configuration Delivery

  • stream-cipher - Enable deprecated stream ciphers. WARN: stream ciphers are UNSAFE!

  • aead-cipher-extra - Enable non-standard AEAD ciphers

  • aead-cipher-2022 - Enable AEAD-2022 ciphers (SIP022)

  • aead-cipher-2022-extra - Enable AEAD-2022 extra ciphers (non-standard ciphers)

Memory Allocators

This project uses system (libc) memory allocator (Rust's default). But it also allows you to use other famous allocators by features:

  • jemalloc - Uses jemalloc as global memory allocator
  • mimalloc - Uses mi-malloc as global memory allocator
  • tcmalloc - Uses TCMalloc as global memory allocator. It tries to link system-wide tcmalloc by default, use vendored from source with tcmalloc-vendored.
  • snmalloc - Uses snmalloc as global memory allocator
  • rpmalloc - Uses rpmalloc as global memory allocator

crates.io

Install from crates.io:

# Install from crates.io
cargo install shadowsocks-rust

then you can find sslocal and ssserver in $CARGO_HOME/bin.

Install using Homebrew

For macOS and Linux, you can install it using Homebrew:

brew install shadowsocks-rust

Install using snap

# Install from snapstore
snap install shadowsocks-rust

# List services
snap services shadowsocks-rust

# Enable and start shadowsocks-rust.sslocal-daemon snap service
snap start --enable shadowsocks-rust.sslocal-daemon

# Show generated systemd service status
systemctl status snap.shadowsocks-rust.sslocal-daemon.service

# Override generated systemd service (configure startup options)
systemctl edit snap.shadowsocks-rust.sslocal-daemon.service

## NOTE: you can pass args to sslocal:
##  [Service]
##  ExecStart=
##  ExecStart=/usr/bin/snap run shadowsocks-rust.sslocal-daemon -b "127.0.0.1:1080" --server-url "ss://...."

# Restart generated systemd service to apply changes
systemctl restart snap.shadowsocks-rust.sslocal-daemon.service

# ... and show service status
systemctl status snap.shadowsocks-rust.sslocal-daemon.service

Download release

Download static-linked build here.

  • build-windows: Build for x86_64-pc-windows-msvc
  • build-linux: Build for x86_64-unknown-linux-gnu, Debian 9 (Stretch), GLIBC 2.18
  • build-docker: Build for x86_64-unknown-linux-musl, x86_64-pc-windows-gnu, ... (statically linked)

Docker

This project provided Docker images for the linux/i386 and linux/amd64 and linux/arm64/v8 architectures.

⚠️ Docker containers do not have access to IPv6 by default: Make sure to disable IPv6 Route in the client or enable IPv6 access to docker containers.

Pull from GitHub Container Registry

Docker will pull the image of the appropriate architecture from our GitHub Packages.

docker pull ghcr.io/shadowsocks/sslocal-rust:latest
docker pull ghcr.io/shadowsocks/ssserver-rust:latest

Build on the local machine(Optional)

If you want to build the Docker image yourself, you need to use the BuildX.

docker buildx build -t shadowsocks/ssserver-rust:latest -t shadowsocks/ssserver-rust:v1.15.2 --target ssserver .
docker buildx build -t shadowsocks/sslocal-rust:latest -t shadowsocks/sslocal-rust:v1.15.2 --target sslocal .

Run the container

You need to mount the configuration file into the container and create an external port map for the container to connect to it.

docker run --name sslocal-rust \
  --restart always \
  -p 1080:1080/tcp \
  -v /path/to/config.json:/etc/shadowsocks-rust/config.json \
  -dit ghcr.io/shadowsocks/sslocal-rust:latest

docker run --name ssserver-rust \
  --restart always \
  -p 8388:8388/tcp \
  -p 8388:8388/udp \
  -v /path/to/config.json:/etc/shadowsocks-rust/config.json \
  -dit ghcr.io/shadowsocks/ssserver-rust:latest

Deploy to Kubernetes

This project provided yaml manifests for deploying to Kubernetes.

You can leverage k8s Service to expose traffic outside, like LoadBalancer or NodePort which gains more fine-grained compared with fixed host or port.

For a more interesting use case, you can use a Ingress(Istio, nginx, etc.) which routes the matched traffic to shadowsocks along with the real web service.

Using kubectl

kubectl apply -f https://github.com/shadowsocks/shadowsocks-rust/raw/master/k8s/shadowsocks-rust.yaml

You can change the config via editing the ConfigMap named shadowsocks-rust.

For more fine-grained control, use helm.

Using helm

helm install my-release k8s/chart -f my-values.yaml

Below is the common default values you can change:

# This is the shadowsocks config which will be mount to /etc/shadowocks-rust.
# You can put arbitrary yaml here, and it will be translated to json before mounting.
servers:
- server: "::"
  server_port: 8388
  service_port: 80 # the k8s service port, default to server_port
  password: mypassword
  method: aes-256-gcm
  fast_open: true
  mode: tcp_and_udp
  # plugin: v2ray-plugin
  # plugin_opts: server;tls;host=github.com

# Whether to download v2ray and xray plugin.
downloadPlugins: false

# Name of the ConfigMap with config.json configuration for shadowsocks-rust.
configMapName: ""

service:
  # Change to LoadBalancer if you are behind a cloud provider like aws, gce, or tke.
  type: ClusterIP

# Bind shadowsocks port port to host, i.e., we can use host:port to access shawdowsocks server.
hostPort: false

replicaCount: 1

image:
  repository: ghcr.io/shadowsocks/ssserver-rust
  pullPolicy: IfNotPresent
  # Overrides the image tag whose default is the chart appVersion.
  tag: "latest"

Build from source

Use cargo to build. NOTE: RAM >= 2GiB

cargo build --release

Then sslocal and ssserver will appear in ./target/(debug|release)/, it works similarly as the two binaries in the official ShadowSocks' implementation.

make install TARGET=release

Then sslocal, ssserver, ssmanager and ssurl will be installed to /usr/local/bin (variable PREFIX).

For Windows users, if you have encountered any problem in building, check and discuss in #102.

target-cpu optimization

If you are building for your current CPU platform (for example, build and run on your personal computer), it is recommended to set target-cpu=native feature to let rustc generate and optimize code for the CPU running the compiler.

export RUSTFLAGS="-C target-cpu=native"

Build standalone binaries

Requirements:

  • Docker
./build/build-release

Then sslocal, ssserver, ssmanager and ssurl will be packaged in

  • ./build/shadowsocks-${VERSION}-stable.x86_64-unknown-linux-musl.tar.xz
  • ./build/shadowsocks-${VERSION}-stable.x86_64-pc-windows-gnu.zip

Read Cargo.toml for more details.

Getting Started

Generate a safe and secured password for a specific encryption method (aes-128-gcm in the example) with:

ssservice genkey -m "aes-128-gcm"

Create a ShadowSocks' configuration file. Example

{
    "server": "my_server_ip",
    "server_port": 8388,
    "password": "rwQc8qPXVsRpGx3uW+Y3Lj4Y42yF9Bs0xg1pmx8/+bo=",
    "method": "aes-256-gcm",
    // ONLY FOR `sslocal`
    // Delete these lines if you are running `ssserver` or `ssmanager`
    "local_address": "127.0.0.1",
    "local_port": 1080
}

Detailed explanation of the configuration file could be found in shadowsocks' documentation. (Link to original project, not maintained anymore !)

⚠️ For snap installations, configuration file is most probably located in /var/snap/shadowsocks-rust/common/etc/shadowsocks-rust/config.json (see #621 / #1146)

In shadowsocks-rust, we also have an extended configuration file format, which is able to define more than one server. You can also disable individual servers.

{
    "servers": [
        {
            "server": "127.0.0.1",
            "server_port": 8388,
            "password": "rwQc8qPXVsRpGx3uW+Y3Lj4Y42yF9Bs0xg1pmx8/+bo=",
            "method": "aes-256-gcm",
            "timeout": 7200
        },
        {
            "server": "127.0.0.1",
            "server_port": 8389,
            "password": "/dliNXn5V4jg6vBW4MnC1I8Jljg9x7vSihmk6UZpRBM=",
            "method": "chacha20-ietf-poly1305"
        },
        {
            "disabled": true,
            "server": "eg.disable.me",
            "server_port": 8390,
            "password": "mGvbWWay8ueP9IHnV5F1uWGN2BRToiVCAWJmWOTLU24=",
            "method": "chacha20-ietf-poly1305"
        }
    ],
    // ONLY FOR `sslocal`
    // Delete these lines if you are running `ssserver` or `ssmanager`
    "local_port": 1080,
    "local_address": "127.0.0.1"
}

sslocal automatically selects the best server with the lowest latency and the highest availability.

Start Shadowsocks client and server with:

sslocal -c config.json
ssserver -c config.json

If you Build it with Cargo:

cargo run --bin sslocal -- -c config.json
cargo run --bin ssserver -- -c config.json

List all available arguments with -h.

Usage

Start local client with configuration file

# Read local client configuration from file
sslocal -c /path/to/shadowsocks.json

Socks5 Local client

# Pass all parameters via command line
sslocal -b "127.0.0.1:1080" -s "[::1]:8388" -m "aes-256-gcm" -k "hello-kitty" --plugin "v2ray-plugin" --plugin-opts "server;tls;host=github.com"

# Pass server with SIP002 URL
sslocal -b "127.0.0.1:1080" --server-url "ss://[email protected]:8388/?plugin=v2ray-plugin%3Bserver%3Btls%3Bhost%3Dgithub.com"

HTTP Local client

sslocal -b "127.0.0.1:3128" --protocol http -s "[::1]:8388" -m "aes-256-gcm" -k "hello-kitty"

All parameters are the same as Socks5 client, except --protocol http.

Tunnel Local client

# Set 127.0.0.1:8080 as the target for forwarding to
sslocal --protocol tunnel -b "127.0.0.1:3128" -f "127.0.0.1:8080" -s "[::1]:8388" -m "aes-256-gcm" -k "hello-kitty"
  • --protocol tunnel enables local client Tunnel mode
  • -f "127.0.0.1:8080 sets the tunnel target address

Transparent Proxy Local client

NOTE: It currently only supports

  • Linux (with iptables targets REDIRECT and TPROXY)
  • BSDs (with pf), such as OS X 10.10+, FreeBSD, ...
sslocal -b "127.0.0.1:60080" --protocol redir -s "[::1]:8388" -m "aes-256-gcm" -k "hello-kitty" --tcp-redir "redirect" --udp-redir "tproxy"

Redirects connections with iptables configurations to the port that sslocal is listening on.

  • --protocol redir enables local client Redir mode
  • (optional) --tcp-redir sets TCP mode to REDIRECT (Linux)
  • (optional) --udp-redir sets UDP mode to TPROXY (Linux)

Tun interface client

NOTE: It currently only supports

  • Linux, Android
  • macOS, iOS
  • Windows

Linux

Create a Tun interface with name tun0

ip tuntap add mode tun tun0
ifconfig tun0 inet 10.255.0.1 netmask 255.255.255.0 up

Start sslocal with --protocol tun and binds to tun0

sslocal --protocol tun -s "[::1]:8388" -m "aes-256-gcm" -k "hello-kitty" --outbound-bind-interface lo0 --tun-interface-name tun0

macOS

sslocal --protocol tun -s "[::1]:8388" -m "aes-256-gcm" -k "hello-kitty" --outbound-bind-interface lo0 --tun-interface-address 10.255.0.1/24

It will create a Tun interface with address 10.255.0.1 and netmask 255.255.255.0.

Windows

Download wintun.dll from Wintun, and place it in the folder with shadowsocks' runnable binaries, or in the system PATH.

sslocal --protocol tun -s "[::1]:8388" -m "aes-256-gcm" -k "hello-kitty" --outbound-bind-interface "Ethernet 0" --tun-interface-name "shadowsocks"

Local client for Windows Service

Compile it by enabling --features "winservice" (not included in the default build):

cargo build --release --bin "sswinservice" --features "winservice"

Install it as a Windows Service (PowerShell):

New-Service -Name "shadowsocks-local-service" `
            -DisplayName "Shadowsocks Local Service" `
            -BinaryPathName "<Path\to>\sswinservice.exe local -c <Path\to>\local_config.json"

There are other ways to install sswinservice as a Windows Service, for example, the sc command.

As you may have noticed that the -BinaryPathName contains not only just the sswinservice.exe, but local -c local_config.json. These command line parameters will be used as the default parameter when the Windows Service starts. You can also start the service with customized parameters.

Learn more from Microsoft's Document.

The sswinservice's parameter works exactly the same as ssservice. It supports local, server and manager subcommands.

Server

# Read server configuration from file
ssserver -c /path/to/shadowsocks.json

# Pass all parameters via command line
ssserver -s "[::]:8388" -m "aes-256-gcm" -k "hello-kitty" --plugin "v2ray-plugin" --plugin-opts "server;tls;host=github.com"

Server Manager

Supported Manage Multiple Users API:

  • add - Starts a server instance
  • remove - Deletes an existing server instance
  • list - Lists all current running servers
  • ping - Lists all servers' statistic data

NOTE: stat command is not supported. Because servers are running in the same process with the manager itself.

# Start it just with --manager-address command line parameter
ssmanager --manager-address "127.0.0.1:6100"

# For *nix system, manager can bind to unix socket address
ssmanager --manager-address "/tmp/shadowsocks-manager.sock"

# You can also provide a configuration file
#
# `manager_address` key must be provided in the configuration file
ssmanager -c /path/to/shadowsocks.json

# Create one server by UDP
echo 'add: {"server_port":8388,"password":"hello-kitty"}' | nc -u '127.0.0.1' '6100'

# Close one server by unix socket
echo 'remove: {"server_port":8388}' | nc -Uu '/tmp/shadowsocks-manager.sock'

For manager UI, check more details in the shadowsocks-manager project.

Example configuration:

{
    // Required option
    // Address that ssmanager is listening on
    "manager_address": "127.0.0.1",
    "manager_port": 6100,

    // Or bind to a Unix Domain Socket
    "manager_address": "/tmp/shadowsocks-manager.sock",

    "servers": [
        // These servers will be started automatically when ssmanager is started
    ],

    // Outbound socket binds to this IP address
    // For choosing different network interface on the same machine
    "local_address": "xxx.xxx.xxx.xxx",

    // Other options that may be passed directly to new servers
}

Configuration

{
    // LOCAL: Listen address. This is exactly the same as `locals[0]`
    // SERVER: Bind address for remote sockets, mostly used for choosing interface
    //         Don't set it if you don't know what's this for.
    "local_address": "127.0.0.1",
    "local_port": 1080,

    // Extended multiple local configuration
    "locals": [
        {
            // Basic configuration, a SOCKS5 local server
            "local_address": "127.0.0.1",
            "local_port": 1080,
            // OPTIONAL. Setting the `mode` for this specific local server instance.
            // If not set, it will derive from the outer `mode`
            "mode": "tcp_and_udp",
            // OPTIONAL. Authentication configuration file
            // Configuration file document could be found in the next section.
            "socks5_auth_config_path": "/path/to/auth.json",
            // OPTIONAL. Instance specific ACL
            "acl": "/path/to/acl/file.acl",
            // OPTIONAL. macOS launchd activate socket
            "launchd_tcp_socket_name": "TCPListener",
            "launchd_udp_socket_name": "UDPListener"
        },
        {
            // SOCKS5, SOCKS4/4a local server
            "protocol": "socks",
            // Listen address
            "local_address": "127.0.0.1",
            "local_port": 1081,
            // OPTIONAL. Enables UDP relay
            "mode": "tcp_and_udp",
            // OPTIONAL. Customizing the UDP's binding address. Depending on `mode`, if
            // - TCP is enabled, then SOCKS5's UDP Association command will return this address
            // - UDP is enabled, then SOCKS5's UDP server will listen to this address.
            "local_udp_address": "127.0.0.1",
            "local_udp_port": 2081,
            // OPTIONAL. macOS launchd activate socket
            "launchd_tcp_socket_name": "TCPListener",
            "launchd_udp_socket_name": "UDPListener"
        },
        {
            // Tunnel local server (feature = "local-tunnel")
            "protocol": "tunnel",
            // Listen address
            "local_address": "127.0.0.1",
            "local_port": 5353,
            // Forward address, the target of this tunnel
            // In this example, this will build a `127.0.0.1:5353` -> `8.8.8.8:53` tunnel
            "forward_address": "8.8.8.8",
            "forward_port": 53,
            // OPTIONAL. Customizing whether to start TCP and UDP tunnel
            "mode": "tcp_only",
            // OPTIONAL. macOS launchd activate socket
            "launchd_tcp_socket_name": "TCPListener",
            "launchd_udp_socket_name": "UDPListener"
        },
        {
            // HTTP local server (feature = "local-http")
            "protocol": "http",
            // Listen address
            "local_address": "127.0.0.1",
            "local_port": 3128,
            // OPTIONAL. macOS launchd activate socket
            "launchd_tcp_socket_name": "TCPListener"
        },
        {
            // DNS local server (feature = "local-dns")
            // This DNS works like China-DNS, it will send requests to `local_dns` and `remote_dns` and choose by ACL rules
            "protocol": "dns",
            // Listen address
            "local_address": "127.0.0.1",
            "local_port": 53,
            // OPTIONAL. DNS local server uses `tcp_and_udp` mode by default
            "mode": "udp_only",
            // Local DNS address, DNS queries will be sent directly to this address
            "local_dns_address": "114.114.114.114",
            // OPTIONAL. Local DNS's port, 53 by default
            "local_dns_port": 53,
            // Remote DNS address, DNS queries will be sent through ssserver to this address
            "remote_dns_address": "8.8.8.8",
            // OPTIONAL. Remote DNS's port, 53 by default
            "remote_dns_port": 53,
            // OPTIONAL. dns client cache size for fetching dns queries.
            "client_cache_size": 5,
            // OPTIONAL. macOS launchd activate socket
            "launchd_tcp_socket_name": "TCPListener",
            "launchd_udp_socket_name": "UDPListener"
        },
        {
            // Tun local server (feature = "local-tun")
            "protocol": "tun",
            // Tun interface name
            "tun_interface_name": "tun0",
            // Tun interface address
            //
            // It has to be a host address in CIDR form
            "tun_interface_address": "10.255.0.1/24"
        },
        {
            // Transparent Proxy (redir) local server (feature = "local-redir")
            "protocol": "redir",
            // OPTIONAL: TCP type, may be different between platforms
            // Linux/Android: redirect (default), tproxy
            // FreeBSD/OpenBSD: pf (default), ipfw
            // NetBSD/macOS/Solaris: pf (default), ipfw
            "tcp_redir": "tproxy",
            // OPTIONAL: UDP type, may be different between platforms
            // Linux/Android: tproxy (default)
            // FreeBSD/OpenBSD: pf (default)
            "udp_redir": "tproxy"
        },
        {
            // FakeDNS local server (feature = "local-fake-dns")
            // FakeDNS is a DNS server that allocates an IPv4 / IPv6 address in a specific pool for each queries.
            // Subsequence requests from the other local interfaces that the target addresses includes those allocated IP addresses,
            // will be substituted back to their original domain name addresses.
            // This feature is useful mostly for transparent proxy, which will allow the proxied domain names to be resolved remotely.
            "protocol": "fake-dns",
            // Listen address
            "local_address": "127.0.0.1",
            "local_port": 10053,
            // IPv4 address pool (for A records)
            "fake_dns_ipv4_network": "10.255.0.0/16",
            // IPv6 address pool (for AAAA records)
            "fake_dns_ipv6_network": "fdf2:e786:ab40:9d2f::/64",
            // Persistent storage for all allocated DNS records
            "fake_dns_database_path": "/var/shadowsocks/fakedns.db",
            // OPTIONAL: Record expire duration in seconds, 10s by default
            "fake_dns_record_expire_duration": 10
        }
    ],

    // Server configuration
    // listen on :: for dual stack support, no need add [] around.
    "server": "::",
    // Change to use your custom port number
    "server_port": 8388,
    "method": "aes-256-gcm",
    "password": "your-password",
    "plugin": "v2ray-plugin",
    "plugin_opts": "mode=quic;host=github.com",
    "plugin_args": [
        // Each line is an argument passed to "plugin"
        "--verbose"
    ],
    "plugin_mode": "tcp_and_udp", // SIP003u, default is "tcp_only"
    // Server: TCP socket timeout in seconds.
    // Client: TCP connection timeout in seconds.
    // Omit this field if you don't have specific needs.
    "timeout": 7200,

    // Extended multiple server configuration
    // LOCAL: Choosing the best server to connect dynamically
    // SERVER: Creating multiple servers in one process
    "servers": [
        {
            // Fields are the same as the single server's configuration

            // Individual servers can be disabled
            // "disabled": true,
            "address": "0.0.0.0",
            "port": 8389,
            "method": "aes-256-gcm",
            "password": "your-password",
            "plugin": "...",
            "plugin_opts": "...",
            "plugin_args": [],
            "plugin_mode": "...",
            "timeout": 7200,

            // Customized weight for local server's balancer
            //
            // Weight must be in [0, 1], default is 1.0.
            // The higher weight, the server may rank higher.
            "tcp_weight": 1.0,
            "udp_weight": 1.0,

            // OPTIONAL. Instance specific ACL
            "acl": "/path/to/acl/file.acl",
        },
        {
            // Same key as basic format "server" and "server_port"
            "server": "0.0.0.0",
            "server_port": 8388,
            "method": "chacha20-ietf-poly1305",
            // Read the actual password from environment variable PASSWORD_FROM_ENV
            "password": "${PASSWORD_FROM_ENV}"
        },
        {
            // AEAD-2022
            "server": "::",
            "server_port": 8390,
            "method": "2022-blake3-aes-256-gcm",
            "password": "3SYJ/f8nmVuzKvKglykRQDSgg10e/ADilkdRWrrY9HU=",
            // For Server (OPTIONAL)
            // Support multiple users with Extensible Identity Header
            // https://github.com/Shadowsocks-NET/shadowsocks-specs/blob/main/2022-2-shadowsocks-2022-extensible-identity-headers.md
            "users": [
                {
                    "name": "username",
                    // User's password must have the same length as server's password
                    "password": "4w0GKJ9U3Ox7CIXGU4A3LDQAqP6qrp/tUi/ilpOR9p4="
                }
            ],
            // For Client (OPTIONAL)
            // If EIH enabled, then "password" should have the following format: iPSK:iPSK:iPSK:uPSK
            // - iPSK is one of the middle relay servers' PSK, for the last `ssserver`, it must be server's PSK ("password")
            // - uPSK is the user's PSK ("password")
            // Example:
            // "password": "3SYJ/f8nmVuzKvKglykRQDSgg10e/ADilkdRWrrY9HU=:4w0GKJ9U3Ox7CIXGU4A3LDQAqP6qrp/tUi/ilpOR9p4="
        }
    ],

    // Global configurations for UDP associations
    "udp_timeout": 300, // Timeout for UDP associations (in seconds), 5 minutes by default
    "udp_max_associations": 512, // Maximum UDP associations to be kept in one server, unlimited by default

    // Options for Manager
    "manager_address": "127.0.0.1", // Could be a path to UNIX socket, /tmp/shadowsocks-manager.sock
    "manager_port": 5300, // Not needed for UNIX socket

    // DNS server's address for resolving domain names
    // For *NIX and Windows, it uses system's configuration by default
    //
    // Value could be IP address of DNS server, for example, "8.8.8.8".
    // DNS client will automatically request port 53 with both TCP and UDP protocol.
    //
    // - system, uses system provided API (`getaddrinfo` on *NIX)
    //
    // It also allows some pre-defined well-known public DNS servers:
    // - google (TCP, UDP)
    // - cloudflare (TCP, UDP)
    // - cloudflare_tls (TLS), enable by feature "dns-over-tls"
    // - cloudflare_https (HTTPS), enable by feature "dns-over-https"
    // - quad9 (TCP, UDP)
    // - quad9_tls (TLS), enable by feature "dns-over-tls"
    //
    // The field is only effective if feature "hickory-dns" is enabled.
    "dns": "google",
    // Configure `cache_size` for "hickory-dns" ResolverOpts. Set to "0" to disable DNS cache.
    "dns_cache_size": 0,

    // Mode, could be one of the
    // - tcp_only
    // - tcp_and_udp
    // - udp_only
    "mode": "tcp_only",

    // TCP_NODELAY
    "no_delay": false,

    // Enables `SO_KEEPALIVE` and set `TCP_KEEPIDLE`, `TCP_KEEPINTVL` to the specified seconds
    "keep_alive": 15,

    // Soft and Hard limit of file descriptors on *NIX systems
    "nofile": 10240,

    // Try to resolve domain name to IPv6 (AAAA) addresses first
    "ipv6_first": false,
    // Set IPV6_V6ONLY for all IPv6 listener sockets
    // Only valid for locals and servers listening on `::`
    "ipv6_only": false,

    // Outbound socket options
    // Linux Only (SO_MARK)
    "outbound_fwmark": 255,
    // FreeBSD only (SO_USER_COOKIE)
    "outbound_user_cookie": 255,
    // `SO_BINDTODEVICE` (Linux), `IP_BOUND_IF` (BSD), `IP_UNICAST_IF` (Windows) socket option for outbound sockets
    "outbound_bind_interface": "eth1",
    // Outbound socket bind() to this IP (choose a specific interface)
    "outbound_bind_addr": "11.22.33.44",

    // Balancer customization
    "balancer": {
        // MAX Round-Trip-Time (RTT) of servers
        // The timeout seconds of each individual checks
        "max_server_rtt": 5,
        // Interval seconds between each check
        "check_interval": 10,
        // Interval seconds between each check for the best server
        // Optional. Specify to enable shorter checking interval for the best server only.
        "check_best_interval": 5
    },

    // SIP008 Online Configuration Delivery
    // https://shadowsocks.org/doc/sip008.html
    "online_config": {
        "config_url": "https://path-to-online-sip008-configuration",
        // Optional. Seconds between each update to config_url. Default to 3600s
        "update_interval": 3600
    },

    // Service configurations
    // Logger configuration
    "log": {
        // Equivalent to `-v` command line option
        "level": 1,
        "format": {
            // Euiqvalent to `--log-without-time`
            "without_time": false,
        },
        // Equivalent to `--log-config`
        // More detail could be found in https://crates.io/crates/log4rs
        "config_path": "/path/to/log4rs/config.yaml"
    },
    // Runtime configuration
    "runtime": {
        // single_thread or multi_thread
        "mode": "multi_thread",
        // Worker threads that are used in multi-thread runtime
        "worker_count": 10
    }
}

SOCKS5 Authentication Configuration

The configuration file is set by socks5_auth_config_path in locals.

{
    // Password/Username Authentication (RFC1929)
    "password": {
        "users": [
            {
                "user_name": "USERNAME in UTF-8",
                "password": "PASSWORD in UTF-8"
            }
        ]
    }
}

Environment Variables

  • SS_SERVER_PASSWORD: A default password for servers that created from command line argument (--server-addr)
  • SS_SYSTEM_DNS_RESOLVER_FORCE_BUILTIN: "system" DNS resolver force use system's builtin (getaddrinfo in *NIX)

Supported Ciphers

AEAD 2022 Ciphers

  • 2022-blake3-aes-128-gcm, 2022-blake3-aes-256-gcm
  • 2022-blake3-chacha20-poly1305, 2022-blake3-chacha8-poly1305

These Ciphers require "password" to be a Base64 string of key that have exactly the same length of Cipher's Key Size. It is recommended to use ssservice genkey -m "METHOD_NAME" to generate a secured and safe key.

AEAD Ciphers

  • chacha20-ietf-poly1305
  • aes-128-gcm, aes-256-gcm

Stream Ciphers

  • plain or none (No encryption, only used for debugging or with plugins that ensure transport security)
Deprecated

  • table
  • aes-128-cfb, aes-128-cfb1, aes-128-cfb8, aes-128-cfb128
  • aes-192-cfb, aes-192-cfb1, aes-192-cfb8, aes-192-cfb128
  • aes-256-cfb, aes-256-cfb1, aes-256-cfb8, aes-256-cfb128
  • aes-128-ctr
  • aes-192-ctr
  • aes-256-ctr
  • camellia-128-cfb, camellia-128-cfb1, camellia-128-cfb8, camellia-128-cfb128
  • camellia-192-cfb, camellia-192-cfb1, camellia-192-cfb8, camellia-192-cfb128
  • camellia-256-cfb, camellia-256-cfb1, camellia-256-cfb8, camellia-256-cfb128
  • rc4-md5
  • chacha20-ietf

ACL

sslocal, ssserver, and ssmanager support ACL file with syntax like shadowsocks-libev. Some examples could be found in here.

Available sections

  • For local servers (sslocal, ssredir, ...)
    • Modes:
      • [bypass_all] - ACL runs in BlackList mode. Bypasses all addresses that didn't match any rules.
      • [proxy_all] - ACL runs in WhiteList mode. Proxies all addresses that didn't match any rules.
    • Rules:
      • [bypass_list] - Rules for connecting directly
      • [proxy_list] - Rules for connecting through proxies
  • For remote servers (ssserver)
    • Modes:
      • [reject_all] - ACL runs in BlackList mode. Rejects all clients that didn't match any rules.
      • [accept_all] - ACL runs in WhiteList mode. Accepts all clients that didn't match any rules.
    • Rules:
      • [white_list] - Rules for accepted clients
      • [black_list] - Rules for rejected clients
      • [outbound_block_list] - Rules for blocking outbound addresses.

Example

# SERVERS
# For ssserver, accepts requests from all clients by default
[accept_all]

# Blocks these clients
[black_list]
1.2.3.4
127.0.0.1/8

# Disallow these outbound addresses
[outbound_block_list]
127.0.0.1/8
::1
# Using regular expression
^[a-z]{5}\.baidu\.com
# Match exactly
|baidu.com
# Match with subdomains
||google.com
# An internationalized domain name should be converted to punycode
# |☃-⌘.com - WRONG
|xn----dqo34k.com
# ||джpумлатест.bрфa - WRONG
||xn--p-8sbkgc5ag7bhce.xn--ba-lmcq

# CLIENTS
# For sslocal, ..., bypasses all targets by default
[bypass_all]

# Proxy these addresses
[proxy_list]
||google.com
8.8.8.8

Useful Tools

  1. ssurl is for encoding and decoding ShadowSocks URLs (SIP002). Example:
ss://[email protected]:8388/?plugin=obfs-local%3Bobfs%3Dhttp%3Bobfs-host%3Dwww.baidu.com

Notes

It supports the following features:

  • SOCKS5 CONNECT command
  • SOCKS5 UDP ASSOCIATE command (partial)
  • SOCKS4/4a CONNECT command
  • Various crypto algorithms
  • Load balancing (multiple servers) and server delay checking
  • SIP004 AEAD ciphers
  • SIP003 Plugins
  • SIP003u Plugin with UDP support
  • SIP002 Extension ss URLs
  • SIP022 AEAD 2022 ciphers
  • HTTP Proxy Supports (RFC 7230 and CONNECT)
  • Defend against replay attacks, shadowsocks/shadowsocks-org#44
  • Manager APIs, supporting Manage Multiple Users
  • ACL (Access Control List)
  • Support HTTP/HTTPS Proxy protocol

TODO

  • Documentation
  • Extend configuration format
  • Improved logging format (waiting for the new official log crate)
  • Support more ciphers without depending on libcrypto (waiting for an acceptable Rust crypto lib implementation)
  • Windows support.
  • Build with stable rustc (blocking by crypto2).
  • Support HTTP Proxy protocol
  • AEAD ciphers. (proposed in SIP004, still under discussion)
  • Choose server based on delay #152

License

The MIT License (MIT)

Copyright (c) 2014 Y. T. CHUNG

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Stargazers over time

Stargazers over time

shadowsocks-rust's People

Contributors

18o avatar abcfy2 avatar bennyyip avatar chuxi avatar database64128 avatar dependabot-preview[bot] avatar dependabot[bot] avatar dlon avatar ducksoft avatar eataix avatar faern avatar ibigbug avatar kallydev avatar kimw avatar lilydjwg avatar luozijun avatar lzm0 avatar madeye avatar mygod avatar quininer avatar spyophobia avatar stormynoct avatar stzx avatar vndroid avatar wevsty avatar wyzdot avatar xiazuojie avatar y0ba avatar zedifen avatar zonyitoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shadowsocks-rust's Issues

Question on static-build linked

Hi YT,

I managed to build from source v1.6.5 on Ubuntu with success connecting to client and everything. Took me a long time mainly because I need to have all the Ubuntu tools to build from source and OpenSSL is a paying to install, but I figured it out. After all that and after reading the code I can see that it’s safe, nothing suspicious. Which makes me think that for the next server I might just use the static-linked build and avoid having to deal with Ubuntu development tools.

With that in mind, if I take the latest version from here:
https://github.com/shadowsocks/shadowsocks-rust/releases

and unpack it in a linux x86 server, can I just run ssserver without having to “build” anything? In other words, just run it as a binary with the config.json file? sssever -c config.json and have it run?

Also, what’s the difference between these two gz files?
shadowsocks-v1.6.5-release.x86_64-unknown-linux-musl.tar.gz 7.3 MB
shadowsocks-v1.6.5-release.x86_64-unknown-linux-musl.tar.xz 9.66 MB

Thanks again for all the help. By the way, do you have a Telegram group or something other besides github issues to communicate with you? For example, this is not an issue, more of a question probably better handled somewhere else. I could help with the documentation for others who want to do the same. Hardly any good documentation on shadowsocks in general, most of it in Chinese.

windows下面编译不能通过

日志如下:

D:\Application\Git\shadowsocks-rust>cargo build --verbose
       Fresh rustc-serialize v0.2.9
       Fresh regex v0.1.10
       Fresh traverse v0.0.6
       Fresh log v0.1.10
       Fresh collect v0.0.16
   Compiling shadowsocks-rust v0.9.7 (file:///D:/Application/Git/shadowsocks-rus
t)
     Running `rustc src\lib.rs --crate-name shadowsocks --crate-type lib -g --cf
g feature="cipher-aes-ofb" --cfg feature="enable-udp" --cfg feature="cipher-cast
5-cfb" --cfg feature="cipher-bf-cfb" --cfg feature="cipher-chacha20" --cfg featu
re="default" --cfg feature="cipher-des-cfb" --cfg feature="cipher-rc4" --cfg fea
ture="enable-sodium" --cfg feature="cipher-aes-cfb" --cfg feature="cipher-salsa2
0" --cfg feature="cipher-rc2-cfb" -C metadata=f6fc4adc704fb1ca -C extra-filename
=-f6fc4adc704fb1ca --out-dir D:\Application\Git\shadowsocks-rust\target --emit=d
ep-info,link -L dependency=D:\Application\Git\shadowsocks-rust\target -L depende
ncy=D:\Application\Git\shadowsocks-rust\target\deps --extern collect=D:\Applicat
ion\Git\shadowsocks-rust\target\deps\libcollect-8c3d9901c6e080c1.rlib --extern r
ustc-serialize=D:\Application\Git\shadowsocks-rust\target\deps\librustc-serializ
e-8214bc2e838e96ca.rlib --extern log=D:\Application\Git\shadowsocks-rust\target\
deps\liblog-f0ef1925541ff495.rlib`
     Running `rustc src\bin\local.rs --crate-name sslocal --crate-type bin -g --
cfg feature="cipher-aes-ofb" --cfg feature="enable-udp" --cfg feature="cipher-ca
st5-cfb" --cfg feature="cipher-bf-cfb" --cfg feature="cipher-chacha20" --cfg fea
ture="default" --cfg feature="cipher-des-cfb" --cfg feature="cipher-rc4" --cfg f
eature="enable-sodium" --cfg feature="cipher-aes-cfb" --cfg feature="cipher-sals
a20" --cfg feature="cipher-rc2-cfb" --out-dir D:\Application\Git\shadowsocks-rus
t\target --emit=dep-info,link -L dependency=D:\Application\Git\shadowsocks-rust\
target -L dependency=D:\Application\Git\shadowsocks-rust\target\deps --extern co
llect=D:\Application\Git\shadowsocks-rust\target\deps\libcollect-8c3d9901c6e080c
1.rlib --extern rustc-serialize=D:\Application\Git\shadowsocks-rust\target\deps\
librustc-serialize-8214bc2e838e96ca.rlib --extern log=D:\Application\Git\shadows
ocks-rust\target\deps\liblog-f0ef1925541ff495.rlib --extern shadowsocks=D:\Appli
cation\Git\shadowsocks-rust\target\libshadowsocks-f6fc4adc704fb1ca.rlib`
     Running `rustc src\bin\server.rs --crate-name ssserver --crate-type bin -g
--cfg feature="cipher-aes-ofb" --cfg feature="enable-udp" --cfg feature="cipher-
cast5-cfb" --cfg feature="cipher-bf-cfb" --cfg feature="cipher-chacha20" --cfg f
eature="default" --cfg feature="cipher-des-cfb" --cfg feature="cipher-rc4" --cfg
 feature="enable-sodium" --cfg feature="cipher-aes-cfb" --cfg feature="cipher-sa
lsa20" --cfg feature="cipher-rc2-cfb" --out-dir D:\Application\Git\shadowsocks-r
ust\target --emit=dep-info,link -L dependency=D:\Application\Git\shadowsocks-rus
t\target -L dependency=D:\Application\Git\shadowsocks-rust\target\deps --extern
collect=D:\Application\Git\shadowsocks-rust\target\deps\libcollect-8c3d9901c6e08
0c1.rlib --extern rustc-serialize=D:\Application\Git\shadowsocks-rust\target\dep
s\librustc-serialize-8214bc2e838e96ca.rlib --extern log=D:\Application\Git\shado
wsocks-rust\target\deps\liblog-f0ef1925541ff495.rlib --extern shadowsocks=D:\App
lication\Git\shadowsocks-rust\target\libshadowsocks-f6fc4adc704fb1ca.rlib`
error: linking with `gcc` failed: exit code: 1
note: gcc '-Wl,--enable-long-section-names' '-fno-use-linker-plugin' '-Wl,--nxco
mpat' '-static-libgcc' '-m64' '-L' 'D:\Program Files\Rust\bin\rustlib\x86_64-pc-
windows-gnu\lib' '-o' 'D:\Application\Git\shadowsocks-rust\target\sslocal.exe' '
D:\Application\Git\shadowsocks-rust\target\sslocal.o' '-Wl,--gc-sections' 'D:\Ap
plication\Git\shadowsocks-rust\target\libshadowsocks-f6fc4adc704fb1ca.rlib' 'D:\
Application\Git\shadowsocks-rust\target\deps\librustc-serialize-8214bc2e838e96ca
.rlib' 'D:\Application\Git\shadowsocks-rust\target\deps\liblog-f0ef1925541ff495.
rlib' 'D:\Application\Git\shadowsocks-rust\target\deps\libregex-706bc66b61602e3f
.rlib' 'D:\Program Files\Rust\bin\rustlib\x86_64-pc-windows-gnu\lib\libtest-4e7c
5e5c.rlib' 'D:\Program Files\Rust\bin\rustlib\x86_64-pc-windows-gnu\lib\libgetop
ts-4e7c5e5c.rlib' 'D:\Application\Git\shadowsocks-rust\target\deps\libcollect-8c
3d9901c6e080c1.rlib' 'D:\Application\Git\shadowsocks-rust\target\deps\libtravers
e-d8dae5e298f1b50a.rlib' 'D:\Program Files\Rust\bin\rustlib\x86_64-pc-windows-gn
u\lib\libterm-4e7c5e5c.rlib' 'D:\Program Files\Rust\bin\rustlib\x86_64-pc-window
s-gnu\lib\libserialize-4e7c5e5c.rlib' 'D:\Program Files\Rust\bin\rustlib\x86_64-
pc-windows-gnu\lib\liblog-4e7c5e5c.rlib' 'D:\Program Files\Rust\bin\rustlib\x86_
64-pc-windows-gnu\lib\libstd-4e7c5e5c.rlib' 'D:\Program Files\Rust\bin\rustlib\x
86_64-pc-windows-gnu\lib\libcollections-4e7c5e5c.rlib' 'D:\Program Files\Rust\bi
n\rustlib\x86_64-pc-windows-gnu\lib\libunicode-4e7c5e5c.rlib' 'D:\Program Files\
Rust\bin\rustlib\x86_64-pc-windows-gnu\lib\librand-4e7c5e5c.rlib' 'D:\Program Fi
les\Rust\bin\rustlib\x86_64-pc-windows-gnu\lib\liballoc-4e7c5e5c.rlib' 'D:\Progr
am Files\Rust\bin\rustlib\x86_64-pc-windows-gnu\lib\liblibc-4e7c5e5c.rlib' 'D:\P
rogram Files\Rust\bin\rustlib\x86_64-pc-windows-gnu\lib\libcore-4e7c5e5c.rlib' '
-L' 'D:\Application\Git\shadowsocks-rust\target' '-L' 'D:\Application\Git\shadow
socks-rust\target\deps' '-L' 'D:\Program Files\Rust\bin\rustlib\x86_64-pc-window
s-gnu\lib' '-L' 'D:\Application\Git\shadowsocks-rust\.rust\bin\x86_64-pc-windows
-gnu' '-L' 'D:\Application\Git\shadowsocks-rust\bin\x86_64-pc-windows-gnu' '-Wl,
--whole-archive' '-Wl,-Bstatic' '-Wl,--no-whole-archive' '-Wl,-Bdynamic' '-lcryp
to' '-lsodium' '-lkernel32' '-lws2_32' '-lcompiler-rt'
note: ld: cannot find -lcrypto
ld: cannot find -lsodium

error: aborting due to previous error
error: linking with `gcc` failed: exit code: 1
note: gcc '-Wl,--enable-long-section-names' '-fno-use-linker-plugin' '-Wl,--nxco
mpat' '-static-libgcc' '-m64' '-L' 'D:\Program Files\Rust\bin\rustlib\x86_64-pc-
windows-gnu\lib' '-o' 'D:\Application\Git\shadowsocks-rust\target\ssserver.exe'
'D:\Application\Git\shadowsocks-rust\target\ssserver.o' '-Wl,--gc-sections' 'D:\
Application\Git\shadowsocks-rust\target\libshadowsocks-f6fc4adc704fb1ca.rlib' 'D
:\Application\Git\shadowsocks-rust\target\deps\librustc-serialize-8214bc2e838e96
ca.rlib' 'D:\Application\Git\shadowsocks-rust\target\deps\liblog-f0ef1925541ff49
5.rlib' 'D:\Application\Git\shadowsocks-rust\target\deps\libregex-706bc66b61602e
3f.rlib' 'D:\Program Files\Rust\bin\rustlib\x86_64-pc-windows-gnu\lib\libtest-4e
7c5e5c.rlib' 'D:\Program Files\Rust\bin\rustlib\x86_64-pc-windows-gnu\lib\libget
opts-4e7c5e5c.rlib' 'D:\Application\Git\shadowsocks-rust\target\deps\libcollect-
8c3d9901c6e080c1.rlib' 'D:\Application\Git\shadowsocks-rust\target\deps\libtrave
rse-d8dae5e298f1b50a.rlib' 'D:\Program Files\Rust\bin\rustlib\x86_64-pc-windows-
gnu\lib\libterm-4e7c5e5c.rlib' 'D:\Program Files\Rust\bin\rustlib\x86_64-pc-wind
ows-gnu\lib\libserialize-4e7c5e5c.rlib' 'D:\Program Files\Rust\bin\rustlib\x86_6
4-pc-windows-gnu\lib\liblog-4e7c5e5c.rlib' 'D:\Program Files\Rust\bin\rustlib\x8
6_64-pc-windows-gnu\lib\libstd-4e7c5e5c.rlib' 'D:\Program Files\Rust\bin\rustlib
\x86_64-pc-windows-gnu\lib\libcollections-4e7c5e5c.rlib' 'D:\Program Files\Rust\
bin\rustlib\x86_64-pc-windows-gnu\lib\libunicode-4e7c5e5c.rlib' 'D:\Program File
s\Rust\bin\rustlib\x86_64-pc-windows-gnu\lib\librand-4e7c5e5c.rlib' 'D:\Program
Files\Rust\bin\rustlib\x86_64-pc-windows-gnu\lib\liballoc-4e7c5e5c.rlib' 'D:\Pro
gram Files\Rust\bin\rustlib\x86_64-pc-windows-gnu\lib\liblibc-4e7c5e5c.rlib' 'D:
\Program Files\Rust\bin\rustlib\x86_64-pc-windows-gnu\lib\libcore-4e7c5e5c.rlib'
 '-L' 'D:\Application\Git\shadowsocks-rust\target' '-L' 'D:\Application\Git\shad
owsocks-rust\target\deps' '-L' 'D:\Program Files\Rust\bin\rustlib\x86_64-pc-wind
ows-gnu\lib' '-L' 'D:\Application\Git\shadowsocks-rust\.rust\bin\x86_64-pc-windo
ws-gnu' '-L' 'D:\Application\Git\shadowsocks-rust\bin\x86_64-pc-windows-gnu' '-W
l,--whole-archive' '-Wl,-Bstatic' '-Wl,--no-whole-archive' '-Wl,-Bdynamic' '-lcr
ypto' '-lsodium' '-lkernel32' '-lws2_32' '-lcompiler-rt'
note: ld: cannot find -lcrypto
ld: cannot find -lsodium

error: aborting due to previous error
Build failed, waiting for other jobs to finish...
Could not compile `shadowsocks-rust`.

Caused by:
  Process didn't exit successfully: `rustc src\bin\local.rs --crate-name sslocal
 --crate-type bin -g --cfg feature="cipher-aes-ofb" --cfg feature="enable-udp" -
-cfg feature="cipher-cast5-cfb" --cfg feature="cipher-bf-cfb" --cfg feature="cip
her-chacha20" --cfg feature="default" --cfg feature="cipher-des-cfb" --cfg featu
re="cipher-rc4" --cfg feature="enable-sodium" --cfg feature="cipher-aes-cfb" --c
fg feature="cipher-salsa20" --cfg feature="cipher-rc2-cfb" --out-dir D:\Applicat
ion\Git\shadowsocks-rust\target --emit=dep-info,link -L dependency=D:\Applicatio
n\Git\shadowsocks-rust\target -L dependency=D:\Application\Git\shadowsocks-rust\
target\deps --extern collect=D:\Application\Git\shadowsocks-rust\target\deps\lib
collect-8c3d9901c6e080c1.rlib --extern rustc-serialize=D:\Application\Git\shadow
socks-rust\target\deps\librustc-serialize-8214bc2e838e96ca.rlib --extern log=D:\
Application\Git\shadowsocks-rust\target\deps\liblog-f0ef1925541ff495.rlib --exte
rn shadowsocks=D:\Application\Git\shadowsocks-rust\target\libshadowsocks-f6fc4ad
c704fb1ca.rlib` (status=101)
D:\Application\Git\shadowsocks-rust>

GCC 和Rust的版本:

D:\>gcc -v
Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-w64-mingw32
Configured with: ../../../src/gcc-4.9.1/configure --host=x86_64-w64-mingw32 --bu
ild=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysr
oot=/c/mingw491/x86_64-491-win32-seh-rt_v3-rev1/mingw64 --with-gxx-include-dir=/
mingw64/x86_64-w64-mingw32/include/c++ --enable-shared --enable-static --disable
-multilib --enable-languages=ada,c,c++,fortran,objc,obj-c++,lto --enable-libstdc
xx-time=yes --enable-threads=win32 --enable-libgomp --enable-libatomic --enable-
lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --
enable-version-specific-runtime-libs --disable-isl-version-check --disable-cloog
-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootst
rap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --di
sable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 -
-with-libiconv --with-system-zlib --with-gmp=/c/mingw491/prerequisites/x86_64-w6
4-mingw32-static --with-mpfr=/c/mingw491/prerequisites/x86_64-w64-mingw32-static
 --with-mpc=/c/mingw491/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mi
ngw491/prerequisites/x86_64-w64-mingw32-static --with-cloog=/c/mingw491/prerequi
sites/x86_64-w64-mingw32-static --enable-cloog-backend=isl --with-pkgversion='x8
6_64-win32-seh-rev1, Built by MinGW-W64 project' --with-bugurl=http://sourceforg
e.net/projects/mingw-w64 CFLAGS='-O2 -pipe -I/c/mingw491/x86_64-491-win32-seh-rt
_v3-rev1/mingw64/opt/include -I/c/mingw491/prerequisites/x86_64-zlib-static/incl
ude -I/c/mingw491/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2
 -pipe -I/c/mingw491/x86_64-491-win32-seh-rt_v3-rev1/mingw64/opt/include -I/c/mi
ngw491/prerequisites/x86_64-zlib-static/include -I/c/mingw491/prerequisites/x86_
64-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe -L/c/mingw491/x86_64-491
-win32-seh-rt_v3-rev1/mingw64/opt/lib -L/c/mingw491/prerequisites/x86_64-zlib-st
atic/lib -L/c/mingw491/prerequisites/x86_64-w64-mingw32-static/lib '
Thread model: win32
gcc version 4.9.1 (x86_64-win32-seh-rev1, Built by MinGW-W64 project)

D:\>rustc -V
rustc 1.0.0-nightly (4e4e8cff1 2015-01-24 22:14:14 +0000)

我觉得是缺少Openssl,但是不知道怎么安装这个依赖。

Can I use 2 more Server IP at extended configuration file format ?

Hi
My server has 2 more public ip and use it by "alias ip"

ex)
eth0 Link encap:Ethernet HWaddr 00:15:17:b6:5e:3c
inet addr:1.1.1.1 Bcast:1.1.1.255 Mask:255.255.255.0
inet6 addr: fe80::215:17ff:feb6:5e3c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1667560 errors:0 dropped:0 overruns:0 frame:0
TX packets:223040 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:642417843 (612.6 MiB) TX bytes:25090036 (23.9 MiB)
Interrupt:18 Memory:b8820000-b8840000

eth0:1 Link encap:Ethernet HWaddr 00:15:17:b6:5e:3c
inet addr:1.1.1.2 Bcast:1.1.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:18 Memory:b8820000-b8840000

each ip works well

so I congure shadowsocks-rust like this

{
"servers": [
{
"address": "1.1.1.1",
"port": 1080,
"password": "hello-world",
"method": "bf-cfb",
"timeout": 300,
},
{
"address": "1.1.1.2",
"port": 1081,
"password": "hello-kitty",
"method": "aes-128-cfb"
}
],
"local_port": 8388,
"local_address": "127.0.0.1"
}

**shadowsocks client connect to 1.1.1.1 ,1.1.1.2 without problem
but after connection,If I check client's web public IP
all IP check site only showing 1.1.1.1 even when I connect to 1.1.1.2

is there good solution for this situation ?**

create conn pool for sslocal, with r2d2 or other pool lib

The current shadowsocks-rust implement not very fast. because the conn will be init if needed.
If we want to boost the conn performance, we need conn pool , Once we need conn, just get one from conn pool. it will be faster than the current.

Unexpected proxy connection aborted

OS: macOS 10.12
Rustc: rustc 1.12.0 (3191fbae9 2016-09-23)

While testing socks5 proxy protocol, connection aborted while response body unfinished.

$ curl --socks5 127.0.0.1:1080 https://www.facebook.com -v
* Rebuilt URL to: https://www.facebook.com/
*   Trying 127.0.0.1...
* TCP_NODELAY set
* SOCKS5 communication to www.facebook.com:443
* SOCKS5 connect to IPv4 31.13.95.36 (locally resolved)
* SOCKS5 request granted.
* Connected to 127.0.0.1 (127.0.0.1) port 1080 (#0)
* TLS 1.2 connection using TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
* Server certificate: *.facebook.com
* Server certificate: DigiCert SHA2 High Assurance Server CA
* Server certificate: DigiCert High Assurance EV Root CA
> GET / HTTP/1.1
> Host: www.facebook.com
> User-Agent: curl/7.50.3
> Accept: */*
>
< HTTP/1.1 200 OK
< P3P: CP="Facebook does not have a P3P policy. Learn why here: http://fb.me/p3p"
< Strict-Transport-Security: max-age=15552000; preload
< Cache-Control: private, no-cache, no-store, must-revalidate
< Expires: Sat, 01 Jan 2000 00:00:00 GMT
< Pragma: no-cache

// ......... many many response omitted

ion value="1931">1931</option><option value="1930">1930</option><option value="1929">1929</option><option value="1928">1928</option><option * SSLRead() return error -9845
* Curl_http_done: called premature == 1
* Closing connection 0
curl: (56) SSLRead() return error -9845

Which means proxy connection aborted unexpectedly.

os error 104

刚又试了一次,开始还是no supported address type,后来我删了json,直接用原来ss-go版本可以用的json就能连上了。奇怪,可能原来是我眼花,json没写对。

但是会出现如下两个错误:

[2016-11-05][00:53:30][ERROR] Relay *.*.*.*:443 client -> server aborted: Connection reset by peer (os error 104)
[2016-11-05][00:53:30][ERROR] Failed to handle client (*.*.*.*:52101): Connection reset by peer (os error 104)

另外,同一视频,测试了两次,youtube统计显示go版本的能跑2000+k,这个版本只能500K左右,不知何故。

Is it necessary to run slocal on the server side?

There’s sslocal and ssserver. Is sslocal just a client and the other a server?

I’m asking because I’d like to start the server side and don’t know if I need to start both or just ssserver.

Thanks

chacha20 一直在客户端报错

[2017-08-03][16:19:54][ERROR] Failed to handle client: Invalid Socks5 version
[2017-08-03][16:19:54][ERROR] Failed to handle client: Connection refused (os error 111)
[2017-08-03][16:19:54][ERROR] Failed to connect remote server, Error { repr: Os { code: 111, message: "Connection refused" } }

换 aes-256-cfb 则没有任何问题

Generate Salt with OsRng instead

It has already been mentions in the doc.

An application that requires an entropy source for cryptographic purposes must use OsRng, which reads randomness from the source that the operating system provides (e.g. /dev/urandom on Unixes or CryptGenRandom() on Windows). The other random number generators provided by this module are not suitable for such purposes.

使用安卓客户端连接时,vps的ss进程会被强制终止

服务端系统:Debian 8
ss-rust版本:1.6.1

使用的加密:aes-256-gcm

桌面系统:win7sp1 64
桌面客户端版本:shadowsocks-windows 4.0.5

安卓系统:Android 5.1.1
安卓客户端版本:影梭 4.2.3

具体出现的问题:
在使用win客户端连接使用时,能正常使用
使用安卓客户端连接使用时,可能会在1~5分钟之内断开连接,登录vps检查ss进程时,发现ss进程已经消失

补充错误日志:
t3 6 2l9u4 jesbsgl2 e01
打码部分为我的ip

8.28补充:我关闭了服务端的udp转发,然后安卓客户端连接就不再出现上述现象了

TcpRelay does not relay IpAddresses in some cases

Hi,

After some debugging i noticed TcpRelaying does not relay pure ip addresses. Precisely tcprelay server always takes Line 73 (https://github.com/zonyitoo/shadowsocks-rust/blob/master/src/relay/tcprelay/server.rs#L73) as the path and failed to resolve ip addresess like 1.1.1.1.

I faced this issue when using telegram above ss so that it was unable to connect to its servers.
I think it should be correct for UdpRelay too.

I should declare it only happens for iOS + WaterDrop (shadowsocks client) ( anyway it works for other tcprelayed domain for e.g apple push notification service) whereas it works correctly with Android Version.

Thank you

addr 变量命名的问题

目前,别的没有发现,对于 addr 这个变量充斥了整个项目
目前应该有这么几个地址,需要明确
image
现在 addr 看的眼疼,可以在 addr 加上一些前缀,来减少这种混淆

怎么在后台运行

直接下载了编译后的版本,ssserver -c ss.json
是不是可以加个--daemon

failed to build with nightly Rust

/Users/yukang/code/shadowsocks-rust/src/config.rs:94:19: 94:23 error: `deriving` may only be applied to structs and enums
/Users/yukang/code/shadowsocks-rust/src/config.rs:94 #[deriving(Clone, Show)]
                                                                       ^~~~
/Users/yukang/code/shadowsocks-rust/src/config.rs:94:12: 94:17 error: `deriving` may only be applied to structs and enums
/Users/yukang/code/shadowsocks-rust/src/config.rs:94 #[deriving(Clone, Show)]
                                                                ^~~~~
error: aborting due to 2 previous errors
Could not compile `shadowsocks-rust`.
rustc -v

rustc 0.13.0-nightly (2274996a1 2014-11-23 00:36:43 +0000)

服务端转发请求不正确

服务端已经编译并且运行好了ss-rust,本地客户端使用ss-libev,访问网站时报400 bad request错误。
同时,-u参数没有实现,我在服务端加-u运行不起来

Ubuntu下没有编译成功

已安装libsodium 1.0.2 和 libssl-dev

Cargo汇报:
error: aborting due to 6 previous errors
Could not compile collect.

部分资源加载失败

重现方法:

  1. 使用feature-coro这个branch

  2. 使用本项目的sslocal,可加配任意的服务端,建议还是用本项目的ssserver

  3. 浏览器配置Socks5代理至sslocal,访问任意网站,部分资源加载会失败。

    使用Chrome + SwitchySharp,失败的资源会显示ERR_CONNECTION_CLOSED,但单独访问该资源URL成功(但可能会有一闪而过一个ERR_CONNECTION_CLOSED的Chrome报错页面)

使用本项目ssserver与官方sslocal搭配没有问题,因此问题出在本项目的sslocal,从现象来看很可能是与浏览器之间的协议不对。

运行cargo build,遇到错误,如何解决?

hi.

root@AR:/shadowsocks-rust# ls
Cargo.toml examples LICENSE README.md src
root@AR:
/shadowsocks-rust# cargo build
Updating git repository https://github.com/zonyitoo/libsodium-sys.git
Updating git repository https://github.com/zonyitoo/coio-rs.git
Updating registry https://github.com/rust-lang/crates.io-index
Updating git repository https://github.com/zonyitoo/lru-cache.git
Updating git repository https://github.com/carllerche/mio.git
Updating git repository https://github.com/zonyitoo/context-rs.git
Updating git repository https://github.com/alexcrichton/miow
Updating git repository https://github.com/carllerche/bytes
Updating git repository https://github.com/carllerche/nix-rust
Compiling pkg-config v0.3.6
Compiling slab v0.1.2
Compiling winapi-build v0.1.1
Compiling cfg-if v0.1.0
Compiling libc v0.1.12
Compiling ansi_term v0.6.3
Compiling libc v0.2.1
Compiling bytes v0.2.10 (https://github.com/carllerche/bytes?rev=7edb577d0a#7edb577d)
Compiling bitflags v0.3.2
Compiling strsim v0.4.0
Compiling byteorder v0.3.13
Compiling linked-hash-map v0.0.6
/root/.cargo/registry/src/github.com-121aea75f9ef2ce2/linked-hash-map-0.0.6/src/lib.rs:31:1: 31:28 error: #[feature] may not be used on the stable release channel
/root/.cargo/registry/src/github.com-121aea75f9ef2ce2/linked-hash-map-0.0.6/src/lib.rs:31 #![feature(hashmap_hasher)]
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/.cargo/registry/src/github.com-121aea75f9ef2ce2/linked-hash-map-0.0.6/src/lib.rs:32:1: 32:21 error: #[feature] may not be used on the stable release channel
/root/.cargo/registry/src/github.com-121aea75f9ef2ce2/linked-hash-map-0.0.6/src/lib.rs:32 #![feature(box_raw)]
^~~~~~~~~~~~~~~~~~~~
/root/.cargo/registry/src/github.com-121aea75f9ef2ce2/linked-hash-map-0.0.6/src/lib.rs:33:1: 33:24 error: #[feature] may not be used on the stable release channel
/root/.cargo/registry/src/github.com-121aea75f9ef2ce2/linked-hash-map-0.0.6/src/lib.rs:33 #![feature(iter_order)]
^~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to 3 previous errors
Compiling winapi v0.2.4
Compiling rustc-serialize v0.3.16
Compiling advapi32-sys v0.1.2
Compiling ws2_32-sys v0.1.0
Compiling kernel32-sys v0.1.4
Compiling log v0.3.3
Compiling libsodium-sys v0.1.1 (https://github.com/zonyitoo/libsodium-sys.git#bf59b517)
Compiling nix v0.4.1 (https://github.com/carllerche/nix-rust?rev=ad87c3bdc9#ad87c3bd)
Compiling clap v1.4.7
Build failed, waiting for other jobs to finish...
Could not compile linked-hash-map.

To learn more, run the command again with --verbose.
root@AR:~/shadowsocks-rust#

how to fix it?
thanks!

config 实例改为全局 static 变量。

现在 TcpRelayServer 中的 run 函数里很多 clone,config 对于一个 shadowsocks 实例应该只会有一个,从性能和逻辑上都符合作为一个全局 static 变量实现。
@zonyitoo 如何?

Failed to install.

error: failed to compile `shadowsocks-rust v1.0.1`, intermediate artifacts can be found at `/tmp/cargo-install.9m8HtpLBFnGM`

Caused by:
  failed to run custom build command for `openssl-sys-extras v0.7.14`
process didn't exit successfully: `/tmp/cargo-install.9m8HtpLBFnGM/release/build/openssl-sys-extras-5c7e4d8925825f00/build-script-build` (exit code: 101)
--- stdout
TARGET = Some("x86_64-unknown-linux-gnu")
OPT_LEVEL = Some("3")
PROFILE = Some("release")
TARGET = Some("x86_64-unknown-linux-gnu")
debug=false opt-level=3
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CC_x86_64-unknown-linux-gnu = None
CC_x86_64_unknown_linux_gnu = None
HOST_CC = None
CC = None
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CFLAGS_x86_64-unknown-linux-gnu = None
CFLAGS_x86_64_unknown_linux_gnu = None
HOST_CFLAGS = None
CFLAGS = None
running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-m64" "-fPIC" "-o" "/tmp/cargo-install.9m8HtpLBFnGM/release/build/openssl-sys-extras-5c7e4d8925825f00/out/src/openssl_shim.o" "-c" "src/openssl_shim.c"
cargo:warning=src/openssl_shim.c: In function ‘DH_new_from_params’:
cargo:warning=src/openssl_shim.c:132:7: error: dereferencing pointer to incomplete type ‘DH {aka struct dh_st}’
cargo:warning=     dh->p = p;
cargo:warning=       ^~
cargo:warning=src/openssl_shim.c: In function ‘X509_get_extensions_shim’:
cargo:warning=src/openssl_shim.c:143:13: error: dereferencing pointer to incomplete type ‘X509 {aka struct x509_st}’
cargo:warning=     return x->cert_info ? x->cert_info->extensions : NULL;
cargo:warning=             ^~
ExitStatus(ExitStatus(256))


command did not execute successfully, got: exit code: 1



--- stderr
thread 'main' panicked at 'explicit panic', .cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.41/src/lib.rs:1018
note: Run with `RUST_BACKTRACE=1` for a backtrace.

BTW I set up the rust/cargo environment by apt.

failed to compile `shadowsocks-rust v1.5.0`

Linux 4.9.4-1.el7.elrepo.x86_64 #1 SMP Mon Jan 16 14:34:22 EST 2017 x86_64 x86_64 x86_64 GNU/Linux

rustc --version
rustc 1.18.0 (03fc9d622 2017-06-06)

error: failed to compileshadowsocks-rust v1.5.0, intermediate artifacts can be found at /tmp/cargo-install.WWP9tq5QcWJ5`

Caused by:
failed to run custom build command for libsodium-sys v0.0.15
process didn't exit successfully: /tmp/cargo-install.WWP9tq5QcWJ5/release/build/libsodium-sys-3e515ebbad4a435c/build-script-build (exit code: 101)
--- stderr
thread 'main' panicked at 'called Result::unwrap() on an Err value: "\"pkg-config\" \"--libs\" \"--cflags\" \"libsodium\" did not exit successfully: exit code: 1\n--- stderr\nPackage libsodium was not found in the pkg-config search path.\nPerhaps you should add the directory containing libsodium.pc\'\nto the PKG_CONFIG_PATH environment variable\nNo package \'libsodium\' found\n"', /checkout/src/libcore/result.rs:859 stack backtrace: 0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 1: std::sys_common::backtrace::_print at /checkout/src/libstd/sys_common/backtrace.rs:71 2: std::panicking::default_hook::{{closure}} at /checkout/src/libstd/sys_common/backtrace.rs:60 at /checkout/src/libstd/panicking.rs:355 3: std::panicking::default_hook at /checkout/src/libstd/panicking.rs:371 4: std::panicking::rust_panic_with_hook at /checkout/src/libstd/panicking.rs:549 5: std::panicking::begin_panic at /checkout/src/libstd/panicking.rs:511 6: std::panicking::begin_panic_fmt at /checkout/src/libstd/panicking.rs:495 7: rust_begin_unwind at /checkout/src/libstd/panicking.rs:471 8: core::panicking::panic_fmt at /checkout/src/libcore/panicking.rs:69 9: core::result::unwrap_failed 10: build_script_build::main 11: __rust_maybe_catch_panic at /checkout/src/libpanic_unwind/lib.rs:98 12: std::rt::lang_start at /checkout/src/libstd/panicking.rs:433 at /checkout/src/libstd/panic.rs:361 at /checkout/src/libstd/rt.rs:57 13: __libc_start_main 14: <unknown>

rust-nightly 编译出来的无法连接

[ERROR] Unexpected EOF while reading initialize vector

提示这个错误,用其它客户端正常

另外,貌似选了 -u 参数后会 core dump

再另外,貌似不支持 localhost 这样的本地地址,或者 ::1 这样的 ipv6 地址,还有服务器也不支持域名

Linux set_keepalive error, EINVAL

[2015-05-13][23:12:02][ERROR] Failed to set keep alive: Error { repr: Os(22) }
[2015-05-13][23:12:02][ERROR] Failed to set keep alive: Error { repr: Os(22) }
[2015-05-13][23:12:08][ERROR] Failed to set keep alive: Error { repr: Os(22) }
[2015-05-13][23:12:08][ERROR] Failed to set keep alive: Error { repr: Os(22) }

failed to build

environment:

aws ubuntu 16.04
rustc 1.18.0 (03fc9d622 2017-06-06)
cargo 0.19.0 (28d1d60d4 2017-05-16)
4.12.2-041202-generic

step

git clone  https://github.com/zonyitoo/shadowsocks-rust.git
apt install libcrypto++-dev 
cargo build

result

   Compiling clap v2.25.0
   Compiling aho-corasick v0.6.3
   Compiling lru-cache v0.1.1
   Compiling libsodium-sys v0.0.15
error: failed to run custom build command for `libsodium-sys v0.0.15`
process didn't exit successfully: `/root/shadowsocks-rust/target/debug/build/libsodium-sys-39a193274eecf4b0/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "Failed to run `\"pkg-config\" \"--libs\" \"--cflags\" \"libsodium\"`: No such file or directory (os error 2)"', /checkout/src/libcore/result.rs:859
note: Run with `RUST_BACKTRACE=1` for a backtrace.

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.