修改dns的继续逻辑
This commit is contained in:
parent
2f7373b69b
commit
e8a1b15f8f
@ -197,6 +197,6 @@ forward_to_upstream(Request) ->
|
|||||||
|
|
||||||
-spec select_dns_server() -> {DnsIp :: inet:ip4_address(), DnsPort :: pos_integer()}.
|
-spec select_dns_server() -> {DnsIp :: inet:ip4_address(), DnsPort :: pos_integer()}.
|
||||||
select_dns_server() ->
|
select_dns_server() ->
|
||||||
{ok, DnsServers} = application:get_env(sdlan, public_dns_server),
|
{ok, DnsServers} = application:get_env(sdlan, public_dns_servers),
|
||||||
Idx = rand:uniform(length(DnsServers)),
|
Idx = rand:uniform(length(DnsServers)),
|
||||||
lists:nth(Idx, DnsServers).
|
lists:nth(Idx, DnsServers).
|
||||||
Loading…
x
Reference in New Issue
Block a user