easyss

package module
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2022 License: MIT Imports: 21 Imported by: 0

README

easyss

easyss是一款兼容socks5的安全上网工具,目标是使访问国外技术网站更流畅免受干扰。

有报道表明访问国外技术网站正变得越来越困难,即使用了一些常用代理技术也面临被干扰的可能性。 为了以防万一,提前准备,重新实现了一套协议以加快访问速度和对抗嗅探。

特性

  • 支持SOCKS5,HTTP(S)代理协议

  • 全平台支持(Linux,MacOS,Windows,Android,iOS等)

  • (只)支持(AEAD类型)高强度加密通信, 如aes-256-gcm, chacha20-poly1305

  • http2帧格式交互 (更灵活通用, 更易扩展)

  • 支持tcp连接池 (默认启用,大幅降低请求延迟)

  • 自动pac代理, (可选)支持全局模式, 支持系统托盘图标管理 (thanks lantern)

下载安装

在release页面直接下载(各平台)编译好的二进制文件

去下载

或者 通过源码安装(go version 1.17+ is required)
// Ubuntu20.04 or Debian11 
apt-get install libgtk-3-dev libayatana-appindicator3-dev

// Ubuntu18.04 or Debian10
apt-get install libgtk-3-dev libappindicator3-dev -y

// install fyne which deps by mobile client
go install fyne.io/fyne/v2/cmd/fyne

# build client server
make client-server

# build remote server
make remote-server

# build android apk
make easyss-android

用法

客户端

copy本项目中的config.json文件和上面下载的二进制文件放同一目录. 打开config.json文件, 修改里面对应的项:

  • server: 服务器域名(必填,必须是域名,不能是IP)
  • server_port: 服务器对应端口(必填)
  • local_port: 本地监听端口(默认1080)
  • password: 通信加密密钥(必填)
  • method: 通信加密方式(默认aes-256-gcm)
  • timeout: 超时时间,单位秒

修改完成后, 双击二进制文件,程序会自动启动,托盘会出现easyss的图标,如下:

托盘图标

右键图标可选择全局模式.

手机客户端

Easyss的手机客户端只是在本地启动一个Socks5 Server,然后再将流量加密转发到远端服务器, 因此还需要一个程序能将系统的流量转换为Socks5协议,再转发到Easyss的Socks5端口。

推荐使用Kitsunebi 配合Easyss一起使用。

服务器端

和客户端一样, 先把二进制和config.json文件放同一目录. 修改config.json文件, 其中server(必须是服务器的域名)、server_port和password必填, 执行:

./remote-server

注意:服务器的443端口必须对外可访问,用于TLS校验使用。

docker部署

docker run -d --name easyss --network host nange/docker-easyss:latest -p yourport -k yourpassword -s yourdomain.com

LICENSE

MIT License

Documentation

Index

Constants

View Source
const (
	ESTABLISHED state = iota
	FIN_WAIT1
	FIN_WAIT2
	LAST_ACK
	CLOSING
	CLOSE_WAIT
	TIME_WAIT
	CLOSED
)

Variables

This section is empty.

Functions

func Daemon

func Daemon(godaemon bool)

func DecodeCipherMethod

func DecodeCipherMethod(b byte) string

func EncodeCipherMethod

func EncodeCipherMethod(m string) byte

func PrintVersion

func PrintVersion()

func UpdateConfig

func UpdateConfig(old, ne *Config)

Types

type Config

type Config struct {
	Server     string `json:"server"`
	ServerPort int    `json:"server_port"`
	LocalPort  int    `json:"local_port"`
	Password   string `json:"password"`
	Method     string `json:"method"` // encryption method
	Timeout    int    `json:"timeout"`
	BindALL    bool   `json:"bind_all"`
}

func ParseConfig

func ParseConfig(path string) (config *Config, err error)

type ConnState

type ConnState struct {
	// contains filtered or unexported fields
}

func NewConnState

func NewConnState(s state, buf []byte) *ConnState

func (*ConnState) CloseWait

func (cs *ConnState) CloseWait(conn io.ReadWriteCloser) *ConnState

func (*ConnState) Closed

func (cs *ConnState) Closed(conn io.ReadWriteCloser) *ConnState

func (*ConnState) Closing

func (cs *ConnState) Closing(conn io.ReadWriteCloser) *ConnState

func (*ConnState) FINWait1

func (cs *ConnState) FINWait1(conn io.ReadWriteCloser) *ConnState

func (*ConnState) FINWait2

func (cs *ConnState) FINWait2(conn io.ReadWriteCloser) *ConnState

func (*ConnState) LastACK

func (cs *ConnState) LastACK(conn io.ReadWriteCloser) *ConnState

func (*ConnState) TimeWait

func (cs *ConnState) TimeWait(conn io.ReadWriteCloser) *ConnState

type ConnStateFn

type ConnStateFn func(conn io.ReadWriteCloser) *ConnState

type Easyss

type Easyss struct {
	LogFileWriter io.Writer
	// contains filtered or unexported fields
}

func New

func New(config *Config) *Easyss

func (*Easyss) BindAll added in v1.3.0

func (ss *Easyss) BindAll() bool

func (*Easyss) Close

func (ss *Easyss) Close()

func (*Easyss) HttpLocal

func (ss *Easyss) HttpLocal() error

func (*Easyss) InitTcpPool

func (ss *Easyss) InitTcpPool() error

func (*Easyss) Local

func (ss *Easyss) Local() error

func (*Easyss) LocalAddr added in v1.1.0

func (ss *Easyss) LocalAddr() string

func (*Easyss) LocalPort

func (ss *Easyss) LocalPort() int

func (*Easyss) Remote

func (ss *Easyss) Remote()

func (*Easyss) ServerPort

func (ss *Easyss) ServerPort() int

func (*Easyss) TCPHandle added in v1.1.0

func (ss *Easyss) TCPHandle(s *socks5.Server, conn *net.TCPConn, r *socks5.Request) error

func (*Easyss) UDPHandle added in v1.1.0

func (ss *Easyss) UDPHandle(s *socks5.Server, addr *net.UDPAddr, d *socks5.Datagram) error

type Statistics added in v1.1.0

type Statistics struct {
	BytesSend   int64
	BytesRecive int64
}

Directories

Path Synopsis
cmd
client-server command
easyss command
remote-server command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL