ipv6 for familyProtect and some changes

This commit is contained in:
MHSanaei 2024-01-26 21:57:46 +03:30
parent ec88053df0
commit daa4354047
4 changed files with 8 additions and 5 deletions

View File

@ -915,7 +915,7 @@ Outbound.HttpSettings = class extends CommonClass {
Outbound.WireguardSettings = class extends CommonClass { Outbound.WireguardSettings = class extends CommonClass {
constructor( constructor(
mtu=1420, secretKey=Wireguard.generateKeypair().privateKey, mtu=1420, secretKey=Wireguard.generateKeypair().privateKey,
address='', workers=2, domainStrategy='', reserved='', address=[''], workers=2, domainStrategy='ForceIPv6v4', reserved='',
peers=[new Outbound.WireguardSettings.Peer()], kernelMode=false) { peers=[new Outbound.WireguardSettings.Peer()], kernelMode=false) {
super(); super();
this.mtu = mtu; this.mtu = mtu;
@ -965,7 +965,7 @@ Outbound.WireguardSettings = class extends CommonClass {
}; };
Outbound.WireguardSettings.Peer = class extends CommonClass { Outbound.WireguardSettings.Peer = class extends CommonClass {
constructor(publicKey='', psk='', allowedIPs=['0.0.0.0/0','::/0'], endpoint='', keepAlive=0) { constructor(publicKey=Wireguard.generateKeypair().publicKey, psk='', allowedIPs=['0.0.0.0/0','::/0'], endpoint='', keepAlive=0) {
super(); super();
this.publicKey = publicKey; this.publicKey = publicKey;
this.psk = psk; this.psk = psk;

View File

@ -2297,7 +2297,7 @@ Inbound.WireguardSettings = class extends XrayCommonClass {
}; };
Inbound.WireguardSettings.Peer = class extends XrayCommonClass { Inbound.WireguardSettings.Peer = class extends XrayCommonClass {
constructor(publicKey='', psk='', allowedIPs=['0.0.0.0/0','::/0'], keepAlive=0) { constructor(publicKey=Wireguard.generateKeypair().publicKey, psk='', allowedIPs=['0.0.0.0/0','::/0'], keepAlive=0) {
super(); super();
this.publicKey = publicKey; this.publicKey = publicKey;
this.psk = psk; this.psk = psk;

View File

@ -140,6 +140,7 @@
mtu: 1420, mtu: 1420,
secretKey: warpModal.warpData.private_key, secretKey: warpModal.warpData.private_key,
address: Object.values(config.interface.addresses), address: Object.values(config.interface.addresses),
domainStrategy: 'ForceIPv6v4',
peers: [{ peers: [{
publicKey: peer.public_key, publicKey: peer.public_key,
endpoint: peer.endpoint.host, endpoint: peer.endpoint.host,

View File

@ -569,9 +569,11 @@
familyProtectDNS: { familyProtectDNS: {
"servers": [ "servers": [
"1.1.1.3", // https://developers.cloudflare.com/1.1.1.1/setup/ "1.1.1.3", // https://developers.cloudflare.com/1.1.1.1/setup/
"1.0.0.3" "1.0.0.3",
"2606:4700:4700::1113",
"2606:4700:4700::1003"
], ],
"queryStrategy": "UseIPv4" "queryStrategy": "UseIP"
}, },
} }
}, },