revert: STT ipfamily — причина была в истёкшей vless-подписке
Коммит b122cf3 винил IPv6/inet6fb4 в таймаутах STT на stage.
Диагностика показала иное: api.x.ai «вешает» запросы с валидным
ключом с российских IP (dummy-ключ отвечает 400 мгновенно),
а vless-подписка истекла — egress-узлов нет. Возврат к прежнему
поведению httpc-профиля.
This commit is contained in:
@@ -172,17 +172,11 @@ default_http_post(Url, Headers, ContentType, Body) ->
|
|||||||
%% к STT-апстриму, остальные httpc-вызовы не затрагиваются.
|
%% к STT-апстриму, остальные httpc-вызовы не затрагиваются.
|
||||||
ensure_profile() ->
|
ensure_profile() ->
|
||||||
case inets:start(httpc, [{profile, ?HTTP_PROFILE}]) of
|
case inets:start(httpc, [{profile, ?HTTP_PROFILE}]) of
|
||||||
{ok, _Pid} -> apply_profile_opts();
|
{ok, _Pid} -> apply_proxy();
|
||||||
{error, {already_started, _Pid}} -> apply_profile_opts();
|
{error, {already_started, _Pid}} -> apply_proxy();
|
||||||
_ -> ok
|
_ -> ok
|
||||||
end.
|
end.
|
||||||
|
|
||||||
apply_profile_opts() ->
|
|
||||||
%% Только IPv4: на хостах без IPv6-маршрута httpc с дефолтным
|
|
||||||
%% inet6fb4 висит до таймаута, если AAAA приходит первым.
|
|
||||||
httpc:set_options([{ipfamily, inet}], ?HTTP_PROFILE),
|
|
||||||
apply_proxy().
|
|
||||||
|
|
||||||
apply_proxy() ->
|
apply_proxy() ->
|
||||||
case parse_proxy(proxy_url()) of
|
case parse_proxy(proxy_url()) of
|
||||||
{ok, Host, Port} ->
|
{ok, Host, Port} ->
|
||||||
|
|||||||
Reference in New Issue
Block a user