chore: hello mihomo

This commit is contained in:
wwqgtxx
2023-11-03 21:01:45 +08:00
parent 8c3557e96b
commit 17c9d507be
325 changed files with 1297 additions and 1315 deletions

View File

@@ -6,7 +6,7 @@ import (
"sync"
"time"
"github.com/Dreamacro/clash/common/generics/list"
"github.com/metacubex/mihomo/common/generics/list"
"github.com/samber/lo"
)

View File

@@ -1,9 +1,9 @@
package callback
import (
"github.com/Dreamacro/clash/common/buf"
N "github.com/Dreamacro/clash/common/net"
C "github.com/Dreamacro/clash/constant"
"github.com/metacubex/mihomo/common/buf"
N "github.com/metacubex/mihomo/common/net"
C "github.com/metacubex/mihomo/constant"
)
type firstWriteCallBackConn struct {

View File

@@ -9,10 +9,10 @@ import (
"strconv"
"strings"
"github.com/Dreamacro/clash/log"
"github.com/metacubex/mihomo/log"
)
// ConvertsV2Ray convert V2Ray subscribe proxies data to clash proxies config
// ConvertsV2Ray convert V2Ray subscribe proxies data to mihomo proxies config
func ConvertsV2Ray(buf []byte) ([]map[string]any, error) {
data := DecodeBase64(buf)

View File

@@ -6,7 +6,7 @@ import (
"strings"
"time"
"github.com/Dreamacro/clash/common/utils"
"github.com/metacubex/mihomo/common/utils"
"github.com/metacubex/sing-shadowsocks/shadowimpl"
"github.com/zhangyunhao116/fastrand"

View File

@@ -4,7 +4,7 @@ import (
"bufio"
"net"
"github.com/Dreamacro/clash/common/buf"
"github.com/metacubex/mihomo/common/buf"
)
var _ ExtendedConn = (*BufferedConn)(nil)

View File

@@ -3,7 +3,7 @@ package net
import (
"net"
"github.com/Dreamacro/clash/common/buf"
"github.com/metacubex/mihomo/common/buf"
)
var _ ExtendedConn = (*CachedConn)(nil)

View File

@@ -6,8 +6,8 @@ import (
"runtime"
"time"
"github.com/Dreamacro/clash/common/atomic"
"github.com/Dreamacro/clash/common/net/packet"
"github.com/metacubex/mihomo/common/atomic"
"github.com/metacubex/mihomo/common/net/packet"
)
type readResult struct {

View File

@@ -5,7 +5,7 @@ import (
"os"
"runtime"
"github.com/Dreamacro/clash/common/net/packet"
"github.com/metacubex/mihomo/common/net/packet"
)
type EnhancePacketConn struct {

View File

@@ -4,7 +4,7 @@ import (
"os"
"runtime"
"github.com/Dreamacro/clash/common/net/packet"
"github.com/metacubex/mihomo/common/net/packet"
"github.com/sagernet/sing/common/buf"
"github.com/sagernet/sing/common/bufio"
M "github.com/sagernet/sing/common/metadata"

View File

@@ -1,8 +1,8 @@
package net
import (
"github.com/Dreamacro/clash/common/net/deadline"
"github.com/Dreamacro/clash/common/net/packet"
"github.com/metacubex/mihomo/common/net/deadline"
"github.com/metacubex/mihomo/common/net/packet"
)
type EnhancePacketConn = packet.EnhancePacketConn

View File

@@ -3,7 +3,7 @@ package packet
import (
"net"
"github.com/Dreamacro/clash/common/pool"
"github.com/metacubex/mihomo/common/pool"
)
type WaitReadFrom interface {

View File

@@ -7,7 +7,7 @@ import (
"strconv"
"syscall"
"github.com/Dreamacro/clash/common/pool"
"github.com/metacubex/mihomo/common/pool"
)
type enhanceUDPConn struct {

View File

@@ -5,7 +5,7 @@ import (
"runtime"
"time"
"github.com/Dreamacro/clash/common/buf"
"github.com/metacubex/mihomo/common/buf"
)
type refConn struct {

View File

@@ -12,7 +12,7 @@ package net
//
// go func() {
// // Wrapping to avoid using *net.TCPConn.(ReadFrom)
// // See also https://github.com/Dreamacro/clash/pull/1209
// // See also https://github.com/metacubex/mihomo/pull/1209
// _, err := io.Copy(WriteOnlyWriter{Writer: leftConn}, ReadOnlyReader{Reader: rightConn})
// leftConn.SetReadDeadline(time.Now())
// ch <- err

View File

@@ -5,7 +5,7 @@ import (
"testing"
"time"
"github.com/Dreamacro/clash/common/atomic"
"github.com/metacubex/mihomo/common/atomic"
"github.com/stretchr/testify/assert"
)

View File

@@ -5,7 +5,7 @@ import (
"testing"
"time"
"github.com/Dreamacro/clash/common/atomic"
"github.com/metacubex/mihomo/common/atomic"
"github.com/stretchr/testify/assert"
)