ietfdoh: fixed Base64Url
This commit is contained in:
parent
99b38b2b3c
commit
5f42ae6514
@ -53,7 +53,8 @@ public class HttpsIetfProvider extends HttpsProvider {
|
|||||||
Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
.url(HttpUrl.parse(HTTPS_SUFFIX + uri).newBuilder()
|
.url(HttpUrl.parse(HTTPS_SUFFIX + uri).newBuilder()
|
||||||
.addQueryParameter("dns", Base64.encodeToString(
|
.addQueryParameter("dns", Base64.encodeToString(
|
||||||
message.asBuilder().setId(0).build().toArray(), Base64.DEFAULT))
|
message.asBuilder().setId(0).build().toArray(),
|
||||||
|
Base64.URL_SAFE | Base64.NO_PADDING | Base64.NO_WRAP))
|
||||||
.build())
|
.build())
|
||||||
.get()
|
.get()
|
||||||
.build();
|
.build();
|
||||||
|
@ -36,6 +36,7 @@ public class TlsProvider extends TcpProvider{
|
|||||||
dnsSocket = context.getSocketFactory().createSocket(outPacket.getAddress(),
|
dnsSocket = context.getSocketFactory().createSocket(outPacket.getAddress(),
|
||||||
DNSServerHelper.getPortOrDefault(outPacket.getAddress(), outPacket.getPort()));
|
DNSServerHelper.getPortOrDefault(outPacket.getAddress(), outPacket.getPort()));
|
||||||
//Create TLS v1.2 socket
|
//Create TLS v1.2 socket
|
||||||
|
//TODO: SNI
|
||||||
|
|
||||||
service.protect(dnsSocket);
|
service.protect(dnsSocket);
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
<string name="server_pdomo_secondary">PdoMo DNS 辅服务器</string>
|
<string name="server_pdomo_secondary">PdoMo DNS 辅服务器</string>
|
||||||
<string name="server_puredns_south_china">PureDNS 华南</string>
|
<string name="server_puredns_south_china">PureDNS 华南</string>
|
||||||
<string name="server_puredns_north_china">PureDNS 华北</string>
|
<string name="server_puredns_north_china">PureDNS 华北</string>
|
||||||
<string name="server_rubyfish">红鱼 (DoT/DOH)</string>
|
<string name="server_rubyfish">红鱼 (DoH)</string>
|
||||||
|
|
||||||
<string name="primary_server">首选 DNS 服务器</string>
|
<string name="primary_server">首选 DNS 服务器</string>
|
||||||
<string name="secondary_server">备用 DNS 服务器</string>
|
<string name="secondary_server">备用 DNS 服务器</string>
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
<string name="server_pdomo_secondary">PdoMo DNS 輔伺服器</string>
|
<string name="server_pdomo_secondary">PdoMo DNS 輔伺服器</string>
|
||||||
<string name="server_puredns_south_china">PureDNS 華南</string>
|
<string name="server_puredns_south_china">PureDNS 華南</string>
|
||||||
<string name="server_puredns_north_china">PureDNS 華北</string>
|
<string name="server_puredns_north_china">PureDNS 華北</string>
|
||||||
<string name="server_rubyfish">紅魚 (DoT/DOH)</string>
|
<string name="server_rubyfish">紅魚 (DoH)</string>
|
||||||
|
|
||||||
<string name="primary_server">主要 DNS 伺服器</string>
|
<string name="primary_server">主要 DNS 伺服器</string>
|
||||||
<string name="secondary_server">次要 DNS 伺服器</string>
|
<string name="secondary_server">次要 DNS 伺服器</string>
|
||||||
|
@ -92,7 +92,7 @@
|
|||||||
<string name="server_pdomo_secondary">PdoMo DNS Secondary</string>
|
<string name="server_pdomo_secondary">PdoMo DNS Secondary</string>
|
||||||
<string name="server_puredns_south_china">PureDNS South China</string>
|
<string name="server_puredns_south_china">PureDNS South China</string>
|
||||||
<string name="server_puredns_north_china">PureDNS North China</string>
|
<string name="server_puredns_north_china">PureDNS North China</string>
|
||||||
<string name="server_rubyfish">rubyfish (DoT/DOH)</string>
|
<string name="server_rubyfish">rubyfish (DoH)</string>
|
||||||
|
|
||||||
<string name="primary_server">Primary DNS server</string>
|
<string name="primary_server">Primary DNS server</string>
|
||||||
<string name="secondary_server">Secondary DNS server</string>
|
<string name="secondary_server">Secondary DNS server</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user