implement match_only for resolve routing action
This commit is contained in:
@@ -1 +1,3 @@
|
|||||||
/.idea
|
/.idea
|
||||||
|
works/core/test/go.mod
|
||||||
|
works/core/test/go.sum
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
--- a/adapter/inbound.go
|
||||||
|
+++ b/adapter/inbound.go
|
||||||
|
@@ -79,14 +79,15 @@
|
||||||
|
FallbackNetworkType []C.InterfaceType
|
||||||
|
FallbackDelay time.Duration
|
||||||
|
|
||||||
|
- DestinationAddresses []netip.Addr
|
||||||
|
- SourceGeoIPCode string
|
||||||
|
- GeoIPCode string
|
||||||
|
- ProcessInfo *ConnectionOwner
|
||||||
|
- SourceMACAddress net.HardwareAddr
|
||||||
|
- SourceHostname string
|
||||||
|
- QueryType uint16
|
||||||
|
- FakeIP bool
|
||||||
|
+ DestinationAddresses []netip.Addr
|
||||||
|
+ IgnoreDestinationAddresses bool
|
||||||
|
+ SourceGeoIPCode string
|
||||||
|
+ GeoIPCode string
|
||||||
|
+ ProcessInfo *ConnectionOwner
|
||||||
|
+ SourceMACAddress net.HardwareAddr
|
||||||
|
+ SourceHostname string
|
||||||
|
+ QueryType uint16
|
||||||
|
+ FakeIP bool
|
||||||
|
|
||||||
|
// rule cache
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
+
|
+
|
||||||
+ // Create a go-mysql server with our TLS config
|
+ // Create a go-mysql server with our TLS config
|
||||||
+ inbound.mysqlServer = server.NewServer(
|
+ inbound.mysqlServer = server.NewServer(
|
||||||
+ "8.0.12",
|
+ "9.7.0",
|
||||||
+ gmysql.DEFAULT_COLLATION_ID,
|
+ gmysql.DEFAULT_COLLATION_ID,
|
||||||
+ gmysql.AUTH_NATIVE_PASSWORD,
|
+ gmysql.AUTH_NATIVE_PASSWORD,
|
||||||
+ nil,
|
+ nil,
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
--- a/route/conn.go
|
||||||
|
+++ b/route/conn.go
|
||||||
|
@@ -96,7 +96,7 @@
|
||||||
|
remoteConn net.Conn
|
||||||
|
err error
|
||||||
|
)
|
||||||
|
- if len(metadata.DestinationAddresses) > 0 || metadata.Destination.IsIP() {
|
||||||
|
+ if !metadata.IgnoreDestinationAddresses && (len(metadata.DestinationAddresses) > 0 || metadata.Destination.IsIP()) {
|
||||||
|
remoteConn, err = dialer.DialSerialNetwork(ctx, this, N.NetworkTCP, metadata.Destination, metadata.DestinationAddresses, metadata.NetworkStrategy, metadata.NetworkType, metadata.FallbackNetworkType, metadata.FallbackDelay)
|
||||||
|
} else {
|
||||||
|
remoteConn, err = this.DialContext(ctx, N.NetworkTCP, metadata.Destination)
|
||||||
Reference in New Issue
Block a user