Skip to content

Commit

Permalink
Merge pull request #31 from yuhan6665/wireguard
Browse files Browse the repository at this point in the history
Add DestIpAddress() in Dialer interface
  • Loading branch information
2dust authored Dec 18, 2023
2 parents 60b58b6 + 68d12f8 commit 91d23c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libv2ray_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func NewV2RayPoint(s V2RayVPNServiceSupportsSet, adns bool) *V2RayPoint {
This func will return libv2ray binding version and V2Ray version used.
*/
func CheckVersionX() string {
var version = 25
var version = 26
return fmt.Sprintf("Lib v%d, Xray-core v%s", version, v2core.Version())
}

Expand Down
4 changes: 4 additions & 0 deletions libv2ray_support.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,10 @@ func (d *ProtectedDialer) Dial(ctx context.Context,
return d.fdConn(ctx, resolved.IPs[0], resolved.Port, fd)
}

func (d *ProtectedDialer) DestIpAddress() net.IP {
return d.vServer.currentIP()
}

func (d *ProtectedDialer) fdConn(ctx context.Context, ip net.IP, port int, fd int) (net.Conn, error) {

defer unix.Close(fd)
Expand Down

0 comments on commit 91d23c5

Please sign in to comment.