mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-04-12 08:45:25 -04:00
Feat: routing and freedom outbound ignore Fake DNS (#696)
Turn off fake DNS for request sent from Routing and Freedom outbound. Fake DNS now only apply to DNS outbound. This is important for Android, where VPN service take over all system DNS traffic and pass it to core. "UseIp" option can be used in Freedom outbound to avoid getting fake IP and fail connection. Co-authored-by: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
reflect "reflect"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
dns "github.com/v2fly/v2ray-core/v4/features/dns"
|
||||
)
|
||||
|
||||
// DNSClient is a mock of Client interface.
|
||||
@@ -49,18 +50,18 @@ func (mr *DNSClientMockRecorder) Close() *gomock.Call {
|
||||
}
|
||||
|
||||
// LookupIP mocks base method.
|
||||
func (m *DNSClient) LookupIP(arg0 string) ([]net.IP, error) {
|
||||
func (m *DNSClient) LookupIP(arg0 string, arg1 dns.IPOption) ([]net.IP, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "LookupIP", arg0)
|
||||
ret := m.ctrl.Call(m, "LookupIP", arg0, arg1)
|
||||
ret0, _ := ret[0].([]net.IP)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// LookupIP indicates an expected call of LookupIP.
|
||||
func (mr *DNSClientMockRecorder) LookupIP(arg0 interface{}) *gomock.Call {
|
||||
func (mr *DNSClientMockRecorder) LookupIP(arg0, arg1 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LookupIP", reflect.TypeOf((*DNSClient)(nil).LookupIP), arg0)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LookupIP", reflect.TypeOf((*DNSClient)(nil).LookupIP), arg0, arg1)
|
||||
}
|
||||
|
||||
// Start mocks base method.
|
||||
|
||||
Reference in New Issue
Block a user