From 7b080217bdf2ced2971273d258bed92afb85e109 Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Thu, 13 May 2021 22:18:49 +0800 Subject: [PATCH] Chore: split component to transport --- adapters/inbound/packet.go | 2 +- adapters/inbound/socket.go | 2 +- adapters/inbound/util.go | 2 +- adapters/outbound/shadowsocks.go | 6 +++--- adapters/outbound/shadowsocksr.go | 4 ++-- adapters/outbound/snell.go | 4 ++-- adapters/outbound/socks5.go | 2 +- adapters/outbound/trojan.go | 4 ++-- adapters/outbound/util.go | 2 +- adapters/outbound/vmess.go | 4 ++-- proxy/mixed/mixed.go | 3 +-- proxy/redir/tcp_darwin.go | 2 +- proxy/redir/tproxy.go | 2 +- proxy/redir/udp.go | 2 +- proxy/socks/tcp.go | 2 +- proxy/socks/udp.go | 2 +- proxy/socks/utils.go | 2 +- {component => transport}/gun/gun.go | 0 {component => transport}/simple-obfs/http.go | 0 {component => transport}/simple-obfs/tls.go | 0 {component => transport}/snell/cipher.go | 0 {component => transport}/snell/pool.go | 0 {component => transport}/snell/snell.go | 0 {component => transport}/socks5/socks5.go | 0 {component => transport}/ssr/obfs/base.go | 0 {component => transport}/ssr/obfs/http_post.go | 0 {component => transport}/ssr/obfs/http_simple.go | 2 +- {component => transport}/ssr/obfs/obfs.go | 0 {component => transport}/ssr/obfs/plain.go | 0 {component => transport}/ssr/obfs/random_head.go | 0 {component => transport}/ssr/obfs/tls1.2_ticket_auth.go | 2 +- {component => transport}/ssr/protocol/auth_aes128_md5.go | 2 +- {component => transport}/ssr/protocol/auth_aes128_sha1.go | 2 +- {component => transport}/ssr/protocol/auth_chain_a.go | 2 +- {component => transport}/ssr/protocol/auth_chain_b.go | 2 +- {component => transport}/ssr/protocol/auth_sha1_v4.go | 2 +- {component => transport}/ssr/protocol/base.go | 0 {component => transport}/ssr/protocol/origin.go | 0 {component => transport}/ssr/protocol/packet.go | 2 +- {component => transport}/ssr/protocol/protocol.go | 0 {component => transport}/ssr/protocol/stream.go | 2 +- {component => transport}/ssr/tools/bufPool.go | 0 {component => transport}/ssr/tools/crypto.go | 0 {component => transport}/ssr/tools/random.go | 0 {component => transport}/trojan/trojan.go | 2 +- {component => transport}/v2ray-plugin/mux.go | 0 {component => transport}/v2ray-plugin/websocket.go | 2 +- {component => transport}/vmess/aead.go | 0 {component => transport}/vmess/chunk.go | 0 {component => transport}/vmess/conn.go | 0 {component => transport}/vmess/h2.go | 0 {component => transport}/vmess/header.go | 0 {component => transport}/vmess/http.go | 0 {component => transport}/vmess/tls.go | 0 {component => transport}/vmess/user.go | 0 {component => transport}/vmess/vmess.go | 0 {component => transport}/vmess/websocket.go | 0 57 files changed, 34 insertions(+), 35 deletions(-) rename {component => transport}/gun/gun.go (100%) rename {component => transport}/simple-obfs/http.go (100%) rename {component => transport}/simple-obfs/tls.go (100%) rename {component => transport}/snell/cipher.go (100%) rename {component => transport}/snell/pool.go (100%) rename {component => transport}/snell/snell.go (100%) rename {component => transport}/socks5/socks5.go (100%) rename {component => transport}/ssr/obfs/base.go (100%) rename {component => transport}/ssr/obfs/http_post.go (100%) rename {component => transport}/ssr/obfs/http_simple.go (99%) rename {component => transport}/ssr/obfs/obfs.go (100%) rename {component => transport}/ssr/obfs/plain.go (100%) rename {component => transport}/ssr/obfs/random_head.go (100%) rename {component => transport}/ssr/obfs/tls1.2_ticket_auth.go (99%) rename {component => transport}/ssr/protocol/auth_aes128_md5.go (87%) rename {component => transport}/ssr/protocol/auth_aes128_sha1.go (99%) rename {component => transport}/ssr/protocol/auth_chain_a.go (99%) rename {component => transport}/ssr/protocol/auth_chain_b.go (97%) rename {component => transport}/ssr/protocol/auth_sha1_v4.go (98%) rename {component => transport}/ssr/protocol/base.go (100%) rename {component => transport}/ssr/protocol/origin.go (100%) rename {component => transport}/ssr/protocol/packet.go (93%) rename {component => transport}/ssr/protocol/protocol.go (100%) rename {component => transport}/ssr/protocol/stream.go (94%) rename {component => transport}/ssr/tools/bufPool.go (100%) rename {component => transport}/ssr/tools/crypto.go (100%) rename {component => transport}/ssr/tools/random.go (100%) rename {component => transport}/trojan/trojan.go (98%) rename {component => transport}/v2ray-plugin/mux.go (100%) rename {component => transport}/v2ray-plugin/websocket.go (95%) rename {component => transport}/vmess/aead.go (100%) rename {component => transport}/vmess/chunk.go (100%) rename {component => transport}/vmess/conn.go (100%) rename {component => transport}/vmess/h2.go (100%) rename {component => transport}/vmess/header.go (100%) rename {component => transport}/vmess/http.go (100%) rename {component => transport}/vmess/tls.go (100%) rename {component => transport}/vmess/user.go (100%) rename {component => transport}/vmess/vmess.go (100%) rename {component => transport}/vmess/websocket.go (100%) diff --git a/adapters/inbound/packet.go b/adapters/inbound/packet.go index 001a579b..80b136cd 100644 --- a/adapters/inbound/packet.go +++ b/adapters/inbound/packet.go @@ -1,8 +1,8 @@ package inbound import ( - "github.com/Dreamacro/clash/component/socks5" C "github.com/Dreamacro/clash/constant" + "github.com/Dreamacro/clash/transport/socks5" ) // PacketAdapter is a UDP Packet adapter for socks/redir/tun diff --git a/adapters/inbound/socket.go b/adapters/inbound/socket.go index be772b7b..be717017 100644 --- a/adapters/inbound/socket.go +++ b/adapters/inbound/socket.go @@ -3,9 +3,9 @@ package inbound import ( "net" - "github.com/Dreamacro/clash/component/socks5" C "github.com/Dreamacro/clash/constant" "github.com/Dreamacro/clash/context" + "github.com/Dreamacro/clash/transport/socks5" ) // NewSocket receive TCP inbound and return ConnContext diff --git a/adapters/inbound/util.go b/adapters/inbound/util.go index 6241ac80..07577ec0 100644 --- a/adapters/inbound/util.go +++ b/adapters/inbound/util.go @@ -6,8 +6,8 @@ import ( "strconv" "strings" - "github.com/Dreamacro/clash/component/socks5" C "github.com/Dreamacro/clash/constant" + "github.com/Dreamacro/clash/transport/socks5" ) func parseSocksAddr(target socks5.Addr) *C.Metadata { diff --git a/adapters/outbound/shadowsocks.go b/adapters/outbound/shadowsocks.go index edcd60ab..6dcfc2c0 100644 --- a/adapters/outbound/shadowsocks.go +++ b/adapters/outbound/shadowsocks.go @@ -10,10 +10,10 @@ import ( "github.com/Dreamacro/clash/common/structure" "github.com/Dreamacro/clash/component/dialer" - obfs "github.com/Dreamacro/clash/component/simple-obfs" - "github.com/Dreamacro/clash/component/socks5" - v2rayObfs "github.com/Dreamacro/clash/component/v2ray-plugin" C "github.com/Dreamacro/clash/constant" + obfs "github.com/Dreamacro/clash/transport/simple-obfs" + "github.com/Dreamacro/clash/transport/socks5" + v2rayObfs "github.com/Dreamacro/clash/transport/v2ray-plugin" "github.com/Dreamacro/go-shadowsocks2/core" ) diff --git a/adapters/outbound/shadowsocksr.go b/adapters/outbound/shadowsocksr.go index 6636d5ff..635135fc 100644 --- a/adapters/outbound/shadowsocksr.go +++ b/adapters/outbound/shadowsocksr.go @@ -8,9 +8,9 @@ import ( "strconv" "github.com/Dreamacro/clash/component/dialer" - "github.com/Dreamacro/clash/component/ssr/obfs" - "github.com/Dreamacro/clash/component/ssr/protocol" C "github.com/Dreamacro/clash/constant" + "github.com/Dreamacro/clash/transport/ssr/obfs" + "github.com/Dreamacro/clash/transport/ssr/protocol" "github.com/Dreamacro/go-shadowsocks2/core" "github.com/Dreamacro/go-shadowsocks2/shadowaead" diff --git a/adapters/outbound/snell.go b/adapters/outbound/snell.go index 0b65b272..2dc16a51 100644 --- a/adapters/outbound/snell.go +++ b/adapters/outbound/snell.go @@ -8,9 +8,9 @@ import ( "github.com/Dreamacro/clash/common/structure" "github.com/Dreamacro/clash/component/dialer" - obfs "github.com/Dreamacro/clash/component/simple-obfs" - "github.com/Dreamacro/clash/component/snell" C "github.com/Dreamacro/clash/constant" + obfs "github.com/Dreamacro/clash/transport/simple-obfs" + "github.com/Dreamacro/clash/transport/snell" ) type Snell struct { diff --git a/adapters/outbound/socks5.go b/adapters/outbound/socks5.go index 377d7d17..466797de 100644 --- a/adapters/outbound/socks5.go +++ b/adapters/outbound/socks5.go @@ -11,8 +11,8 @@ import ( "strconv" "github.com/Dreamacro/clash/component/dialer" - "github.com/Dreamacro/clash/component/socks5" C "github.com/Dreamacro/clash/constant" + "github.com/Dreamacro/clash/transport/socks5" ) type Socks5 struct { diff --git a/adapters/outbound/trojan.go b/adapters/outbound/trojan.go index cfd73449..929f4414 100644 --- a/adapters/outbound/trojan.go +++ b/adapters/outbound/trojan.go @@ -9,9 +9,9 @@ import ( "strconv" "github.com/Dreamacro/clash/component/dialer" - "github.com/Dreamacro/clash/component/gun" - "github.com/Dreamacro/clash/component/trojan" C "github.com/Dreamacro/clash/constant" + "github.com/Dreamacro/clash/transport/gun" + "github.com/Dreamacro/clash/transport/trojan" "golang.org/x/net/http2" ) diff --git a/adapters/outbound/util.go b/adapters/outbound/util.go index 932f741c..cd60d373 100644 --- a/adapters/outbound/util.go +++ b/adapters/outbound/util.go @@ -11,8 +11,8 @@ import ( "time" "github.com/Dreamacro/clash/component/resolver" - "github.com/Dreamacro/clash/component/socks5" C "github.com/Dreamacro/clash/constant" + "github.com/Dreamacro/clash/transport/socks5" ) const ( diff --git a/adapters/outbound/vmess.go b/adapters/outbound/vmess.go index 528db7f5..246450ac 100644 --- a/adapters/outbound/vmess.go +++ b/adapters/outbound/vmess.go @@ -11,10 +11,10 @@ import ( "strings" "github.com/Dreamacro/clash/component/dialer" - "github.com/Dreamacro/clash/component/gun" "github.com/Dreamacro/clash/component/resolver" - "github.com/Dreamacro/clash/component/vmess" C "github.com/Dreamacro/clash/constant" + "github.com/Dreamacro/clash/transport/gun" + "github.com/Dreamacro/clash/transport/vmess" "golang.org/x/net/http2" ) diff --git a/proxy/mixed/mixed.go b/proxy/mixed/mixed.go index 3328724e..b89748ee 100644 --- a/proxy/mixed/mixed.go +++ b/proxy/mixed/mixed.go @@ -5,11 +5,10 @@ import ( "time" "github.com/Dreamacro/clash/common/cache" - "github.com/Dreamacro/clash/component/socks5" "github.com/Dreamacro/clash/log" - "github.com/Dreamacro/clash/proxy/http" "github.com/Dreamacro/clash/proxy/socks" + "github.com/Dreamacro/clash/transport/socks5" ) type MixedListener struct { diff --git a/proxy/redir/tcp_darwin.go b/proxy/redir/tcp_darwin.go index 4e9ade1e..5a2f331c 100644 --- a/proxy/redir/tcp_darwin.go +++ b/proxy/redir/tcp_darwin.go @@ -5,7 +5,7 @@ import ( "syscall" "unsafe" - "github.com/Dreamacro/clash/component/socks5" + "github.com/Dreamacro/clash/transport/socks5" ) func parserPacket(c net.Conn) (socks5.Addr, error) { diff --git a/proxy/redir/tproxy.go b/proxy/redir/tproxy.go index e2846e4f..576c4d37 100644 --- a/proxy/redir/tproxy.go +++ b/proxy/redir/tproxy.go @@ -4,9 +4,9 @@ import ( "net" "github.com/Dreamacro/clash/adapters/inbound" - "github.com/Dreamacro/clash/component/socks5" C "github.com/Dreamacro/clash/constant" "github.com/Dreamacro/clash/log" + "github.com/Dreamacro/clash/transport/socks5" "github.com/Dreamacro/clash/tunnel" ) diff --git a/proxy/redir/udp.go b/proxy/redir/udp.go index 45a726e0..57bd3ff3 100644 --- a/proxy/redir/udp.go +++ b/proxy/redir/udp.go @@ -5,8 +5,8 @@ import ( adapters "github.com/Dreamacro/clash/adapters/inbound" "github.com/Dreamacro/clash/common/pool" - "github.com/Dreamacro/clash/component/socks5" C "github.com/Dreamacro/clash/constant" + "github.com/Dreamacro/clash/transport/socks5" "github.com/Dreamacro/clash/tunnel" ) diff --git a/proxy/socks/tcp.go b/proxy/socks/tcp.go index 0f6c4fb4..116ea3f6 100644 --- a/proxy/socks/tcp.go +++ b/proxy/socks/tcp.go @@ -6,10 +6,10 @@ import ( "net" adapters "github.com/Dreamacro/clash/adapters/inbound" - "github.com/Dreamacro/clash/component/socks5" C "github.com/Dreamacro/clash/constant" "github.com/Dreamacro/clash/log" authStore "github.com/Dreamacro/clash/proxy/auth" + "github.com/Dreamacro/clash/transport/socks5" "github.com/Dreamacro/clash/tunnel" ) diff --git a/proxy/socks/udp.go b/proxy/socks/udp.go index 38bc1131..a365353b 100644 --- a/proxy/socks/udp.go +++ b/proxy/socks/udp.go @@ -6,9 +6,9 @@ import ( adapters "github.com/Dreamacro/clash/adapters/inbound" "github.com/Dreamacro/clash/common/pool" "github.com/Dreamacro/clash/common/sockopt" - "github.com/Dreamacro/clash/component/socks5" C "github.com/Dreamacro/clash/constant" "github.com/Dreamacro/clash/log" + "github.com/Dreamacro/clash/transport/socks5" "github.com/Dreamacro/clash/tunnel" ) diff --git a/proxy/socks/utils.go b/proxy/socks/utils.go index 797e0a22..28dfef72 100644 --- a/proxy/socks/utils.go +++ b/proxy/socks/utils.go @@ -4,7 +4,7 @@ import ( "net" "github.com/Dreamacro/clash/common/pool" - "github.com/Dreamacro/clash/component/socks5" + "github.com/Dreamacro/clash/transport/socks5" ) type packet struct { diff --git a/component/gun/gun.go b/transport/gun/gun.go similarity index 100% rename from component/gun/gun.go rename to transport/gun/gun.go diff --git a/component/simple-obfs/http.go b/transport/simple-obfs/http.go similarity index 100% rename from component/simple-obfs/http.go rename to transport/simple-obfs/http.go diff --git a/component/simple-obfs/tls.go b/transport/simple-obfs/tls.go similarity index 100% rename from component/simple-obfs/tls.go rename to transport/simple-obfs/tls.go diff --git a/component/snell/cipher.go b/transport/snell/cipher.go similarity index 100% rename from component/snell/cipher.go rename to transport/snell/cipher.go diff --git a/component/snell/pool.go b/transport/snell/pool.go similarity index 100% rename from component/snell/pool.go rename to transport/snell/pool.go diff --git a/component/snell/snell.go b/transport/snell/snell.go similarity index 100% rename from component/snell/snell.go rename to transport/snell/snell.go diff --git a/component/socks5/socks5.go b/transport/socks5/socks5.go similarity index 100% rename from component/socks5/socks5.go rename to transport/socks5/socks5.go diff --git a/component/ssr/obfs/base.go b/transport/ssr/obfs/base.go similarity index 100% rename from component/ssr/obfs/base.go rename to transport/ssr/obfs/base.go diff --git a/component/ssr/obfs/http_post.go b/transport/ssr/obfs/http_post.go similarity index 100% rename from component/ssr/obfs/http_post.go rename to transport/ssr/obfs/http_post.go diff --git a/component/ssr/obfs/http_simple.go b/transport/ssr/obfs/http_simple.go similarity index 99% rename from component/ssr/obfs/http_simple.go rename to transport/ssr/obfs/http_simple.go index 86dea947..26fb3124 100644 --- a/component/ssr/obfs/http_simple.go +++ b/transport/ssr/obfs/http_simple.go @@ -10,7 +10,7 @@ import ( "strings" "github.com/Dreamacro/clash/common/pool" - "github.com/Dreamacro/clash/component/ssr/tools" + "github.com/Dreamacro/clash/transport/ssr/tools" ) func init() { diff --git a/component/ssr/obfs/obfs.go b/transport/ssr/obfs/obfs.go similarity index 100% rename from component/ssr/obfs/obfs.go rename to transport/ssr/obfs/obfs.go diff --git a/component/ssr/obfs/plain.go b/transport/ssr/obfs/plain.go similarity index 100% rename from component/ssr/obfs/plain.go rename to transport/ssr/obfs/plain.go diff --git a/component/ssr/obfs/random_head.go b/transport/ssr/obfs/random_head.go similarity index 100% rename from component/ssr/obfs/random_head.go rename to transport/ssr/obfs/random_head.go diff --git a/component/ssr/obfs/tls1.2_ticket_auth.go b/transport/ssr/obfs/tls1.2_ticket_auth.go similarity index 99% rename from component/ssr/obfs/tls1.2_ticket_auth.go rename to transport/ssr/obfs/tls1.2_ticket_auth.go index f3c5b456..d9141121 100644 --- a/component/ssr/obfs/tls1.2_ticket_auth.go +++ b/transport/ssr/obfs/tls1.2_ticket_auth.go @@ -10,7 +10,7 @@ import ( "time" "github.com/Dreamacro/clash/common/pool" - "github.com/Dreamacro/clash/component/ssr/tools" + "github.com/Dreamacro/clash/transport/ssr/tools" ) func init() { diff --git a/component/ssr/protocol/auth_aes128_md5.go b/transport/ssr/protocol/auth_aes128_md5.go similarity index 87% rename from component/ssr/protocol/auth_aes128_md5.go rename to transport/ssr/protocol/auth_aes128_md5.go index 08e350c4..d3bc9417 100644 --- a/component/ssr/protocol/auth_aes128_md5.go +++ b/transport/ssr/protocol/auth_aes128_md5.go @@ -1,6 +1,6 @@ package protocol -import "github.com/Dreamacro/clash/component/ssr/tools" +import "github.com/Dreamacro/clash/transport/ssr/tools" func init() { register("auth_aes128_md5", newAuthAES128MD5, 9) diff --git a/component/ssr/protocol/auth_aes128_sha1.go b/transport/ssr/protocol/auth_aes128_sha1.go similarity index 99% rename from component/ssr/protocol/auth_aes128_sha1.go rename to transport/ssr/protocol/auth_aes128_sha1.go index 50383456..65bcd741 100644 --- a/component/ssr/protocol/auth_aes128_sha1.go +++ b/transport/ssr/protocol/auth_aes128_sha1.go @@ -10,8 +10,8 @@ import ( "strings" "github.com/Dreamacro/clash/common/pool" - "github.com/Dreamacro/clash/component/ssr/tools" "github.com/Dreamacro/clash/log" + "github.com/Dreamacro/clash/transport/ssr/tools" ) type hmacMethod func(key, data []byte) []byte diff --git a/component/ssr/protocol/auth_chain_a.go b/transport/ssr/protocol/auth_chain_a.go similarity index 99% rename from component/ssr/protocol/auth_chain_a.go rename to transport/ssr/protocol/auth_chain_a.go index db51e104..4ce55c1a 100644 --- a/component/ssr/protocol/auth_chain_a.go +++ b/transport/ssr/protocol/auth_chain_a.go @@ -12,8 +12,8 @@ import ( "strings" "github.com/Dreamacro/clash/common/pool" - "github.com/Dreamacro/clash/component/ssr/tools" "github.com/Dreamacro/clash/log" + "github.com/Dreamacro/clash/transport/ssr/tools" "github.com/Dreamacro/go-shadowsocks2/core" ) diff --git a/component/ssr/protocol/auth_chain_b.go b/transport/ssr/protocol/auth_chain_b.go similarity index 97% rename from component/ssr/protocol/auth_chain_b.go rename to transport/ssr/protocol/auth_chain_b.go index 2f3f8f17..857b2a3a 100644 --- a/component/ssr/protocol/auth_chain_b.go +++ b/transport/ssr/protocol/auth_chain_b.go @@ -4,7 +4,7 @@ import ( "net" "sort" - "github.com/Dreamacro/clash/component/ssr/tools" + "github.com/Dreamacro/clash/transport/ssr/tools" ) func init() { diff --git a/component/ssr/protocol/auth_sha1_v4.go b/transport/ssr/protocol/auth_sha1_v4.go similarity index 98% rename from component/ssr/protocol/auth_sha1_v4.go rename to transport/ssr/protocol/auth_sha1_v4.go index 0f24c360..30392c9e 100644 --- a/component/ssr/protocol/auth_sha1_v4.go +++ b/transport/ssr/protocol/auth_sha1_v4.go @@ -9,7 +9,7 @@ import ( "net" "github.com/Dreamacro/clash/common/pool" - "github.com/Dreamacro/clash/component/ssr/tools" + "github.com/Dreamacro/clash/transport/ssr/tools" ) func init() { diff --git a/component/ssr/protocol/base.go b/transport/ssr/protocol/base.go similarity index 100% rename from component/ssr/protocol/base.go rename to transport/ssr/protocol/base.go diff --git a/component/ssr/protocol/origin.go b/transport/ssr/protocol/origin.go similarity index 100% rename from component/ssr/protocol/origin.go rename to transport/ssr/protocol/origin.go diff --git a/component/ssr/protocol/packet.go b/transport/ssr/protocol/packet.go similarity index 93% rename from component/ssr/protocol/packet.go rename to transport/ssr/protocol/packet.go index 1577c788..621dc8c8 100644 --- a/component/ssr/protocol/packet.go +++ b/transport/ssr/protocol/packet.go @@ -4,7 +4,7 @@ import ( "bytes" "net" - "github.com/Dreamacro/clash/component/ssr/tools" + "github.com/Dreamacro/clash/transport/ssr/tools" ) type PacketConn struct { diff --git a/component/ssr/protocol/protocol.go b/transport/ssr/protocol/protocol.go similarity index 100% rename from component/ssr/protocol/protocol.go rename to transport/ssr/protocol/protocol.go diff --git a/component/ssr/protocol/stream.go b/transport/ssr/protocol/stream.go similarity index 94% rename from component/ssr/protocol/stream.go rename to transport/ssr/protocol/stream.go index 53f53ead..25d46f74 100644 --- a/component/ssr/protocol/stream.go +++ b/transport/ssr/protocol/stream.go @@ -5,7 +5,7 @@ import ( "net" "github.com/Dreamacro/clash/common/pool" - "github.com/Dreamacro/clash/component/ssr/tools" + "github.com/Dreamacro/clash/transport/ssr/tools" ) type Conn struct { diff --git a/component/ssr/tools/bufPool.go b/transport/ssr/tools/bufPool.go similarity index 100% rename from component/ssr/tools/bufPool.go rename to transport/ssr/tools/bufPool.go diff --git a/component/ssr/tools/crypto.go b/transport/ssr/tools/crypto.go similarity index 100% rename from component/ssr/tools/crypto.go rename to transport/ssr/tools/crypto.go diff --git a/component/ssr/tools/random.go b/transport/ssr/tools/random.go similarity index 100% rename from component/ssr/tools/random.go rename to transport/ssr/tools/random.go diff --git a/component/trojan/trojan.go b/transport/trojan/trojan.go similarity index 98% rename from component/trojan/trojan.go rename to transport/trojan/trojan.go index ef440d62..88cc95fb 100644 --- a/component/trojan/trojan.go +++ b/transport/trojan/trojan.go @@ -11,7 +11,7 @@ import ( "net" "sync" - "github.com/Dreamacro/clash/component/socks5" + "github.com/Dreamacro/clash/transport/socks5" ) const ( diff --git a/component/v2ray-plugin/mux.go b/transport/v2ray-plugin/mux.go similarity index 100% rename from component/v2ray-plugin/mux.go rename to transport/v2ray-plugin/mux.go diff --git a/component/v2ray-plugin/websocket.go b/transport/v2ray-plugin/websocket.go similarity index 95% rename from component/v2ray-plugin/websocket.go rename to transport/v2ray-plugin/websocket.go index fbd1f3e3..9feaf2c2 100644 --- a/component/v2ray-plugin/websocket.go +++ b/transport/v2ray-plugin/websocket.go @@ -5,7 +5,7 @@ import ( "net" "net/http" - "github.com/Dreamacro/clash/component/vmess" + "github.com/Dreamacro/clash/transport/vmess" ) // Option is options of websocket obfs diff --git a/component/vmess/aead.go b/transport/vmess/aead.go similarity index 100% rename from component/vmess/aead.go rename to transport/vmess/aead.go diff --git a/component/vmess/chunk.go b/transport/vmess/chunk.go similarity index 100% rename from component/vmess/chunk.go rename to transport/vmess/chunk.go diff --git a/component/vmess/conn.go b/transport/vmess/conn.go similarity index 100% rename from component/vmess/conn.go rename to transport/vmess/conn.go diff --git a/component/vmess/h2.go b/transport/vmess/h2.go similarity index 100% rename from component/vmess/h2.go rename to transport/vmess/h2.go diff --git a/component/vmess/header.go b/transport/vmess/header.go similarity index 100% rename from component/vmess/header.go rename to transport/vmess/header.go diff --git a/component/vmess/http.go b/transport/vmess/http.go similarity index 100% rename from component/vmess/http.go rename to transport/vmess/http.go diff --git a/component/vmess/tls.go b/transport/vmess/tls.go similarity index 100% rename from component/vmess/tls.go rename to transport/vmess/tls.go diff --git a/component/vmess/user.go b/transport/vmess/user.go similarity index 100% rename from component/vmess/user.go rename to transport/vmess/user.go diff --git a/component/vmess/vmess.go b/transport/vmess/vmess.go similarity index 100% rename from component/vmess/vmess.go rename to transport/vmess/vmess.go diff --git a/component/vmess/websocket.go b/transport/vmess/websocket.go similarity index 100% rename from component/vmess/websocket.go rename to transport/vmess/websocket.go