Kaminari

workflow crates.io downloads telegram

English | 简体中文

The ever fast websocket tunnel built on top of lightws.

Intro

text tcp ws/tls/wss tcp === ============ === +-------------------+ +-------------------+ | | | | +-------> +--------------> +-------> | kaminaric | | kaminaris | <-------+ <--------------+ <-------+ | | | | +-------------------+ +-------------------+

Usage

Standalone:

```shell kaminaric

kaminaris ```

As shadowsocks plugin:

```shell sslocal ... --plugin --plugin-opts

ssserver ... --plugin --plugin-opts ```

Options

All options are presented in a single formatted string. An example is "ws;path=/ws;host=example.com", where semicolons, equal signs and backslashes MUST be escaped with a backslash.

Below is a list of availabe options, * means must.

Websocket Options

use ws to enable websocket.

Client or server side options:

TLS Options

use tls to enable tls.

Client side options:

Server side options:

Requires either cert+key or servername.

Examples

tcp ⇋ ws --- ws ⇋ tcp:

```shell kaminaric 127.0.0.1:10000 127.0.0.1:20000 'ws;host=example.com;path=/ws'

kaminaris 127.0.0.1:20000 127.0.0.1:30000 'ws;host=example.com;path=/ws' ```

tcp ⇋ tls --- tls ⇋ tcp:

```shell kaminaric 127.0.0.1:10000 127.0.0.1:20000 'tls;sni=example.com'

use cert + key

kaminaris 127.0.0.1:20000 127.0.0.1:30000 'tls;cert=example.com.crt;key=example.com.key'

or generate self signed cert/key

kaminaris 127.0.0.1:20000 127.0.0.1:30000 'tls;servername=example.com' ```

tcp ⇋ wss --- wss ⇋ tcp:

```shell kaminaric 127.0.0.1:10000 127.0.0.1:20000 'ws;host=example.com;path=/ws;tls;sni=example.com'

use cert + key

kaminaris 127.0.0.1:20000 127.0.0.1:30000 'ws;host=example.com;path=/ws;tls;cert=example.com.crt;key=example.com.key'

or generate self signed cert/key

kaminaris 127.0.0.1:20000 127.0.0.1:30000 'ws;host=example.com;path=/ws;tls;servername=example.com' ```

shadowsocks plugin:

shell ssserver -s "0.0.0.0:8080" -m "aes-128-gcm" -k "123456" \ --plugin "path/to/kaminaris" \ --plugin-opts "ws;host=example.com;path=/chat"

shell sslocal -b "127.0.0.1:1080" -s "example.com:8080" -m "aes-128-gcm" -k "123456" \ --plugin "path/to/kaminaric" \ --plugin-opts "ws;host=example.com;path=/chat"

*To use v2ray-plugin on client side, add mux=0 to disable multiplex, so that it sends standard websocket stream which can be handled by kaminari or any other middlewares.

shell sslocal -b "127.0.0.1:1080" -s "example.com:8080" -m "aes-128-gcm" -k "123456" \ --plugin "path/to/v2ray-plugin" \ --plugin-opts "mux=0;host=example.com;path=/chat"