Android: patch

This commit is contained in:
wwqgtxx
2023-10-23 16:50:43 +08:00
parent 79a29826a4
commit a551d7ebd9
30 changed files with 512 additions and 59 deletions

View File

@ -2,7 +2,7 @@ package constant
var (
GeodataMode bool
GeoIpUrl string
MmdbUrl string
GeoSiteUrl string
GeoIpUrl = "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geoip.dat"
MmdbUrl = "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/country.mmdb"
GeoSiteUrl = "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geosite.dat"
)

View File

@ -147,6 +147,9 @@ type Metadata struct {
SpecialProxy string `json:"specialProxy"`
SpecialRules string `json:"specialRules"`
RemoteDst string `json:"remoteDestination"`
RawSrcAddr net.Addr `json:"-"`
RawDstAddr net.Addr `json:"-"`
// Only domain rule
SniffHost string `json:"sniffHost"`
}

11
constant/patch.go Normal file
View File

@ -0,0 +1,11 @@
package constant
import "net"
type WrappedConn interface {
RawConn() (net.Conn, bool)
}
type WrappedPacketConn interface {
RawPacketConn() (net.PacketConn, bool)
}