Home API Manuals About Forum
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

UseProxy

Returns whether the current connection uses a SOCKS/HTTP proxy.

Returns True if the network connection is routed through a proxy, False otherwise.

The proxy settings are configured in the Stealth profile. Use ProxyIP and ProxyPort to get the proxy address.

Возвращает, использует ли текущее подключение SOCKS/HTTP-прокси.

Возвращает True, если сетевое соединение проходит через прокси, False — в противном случае.

Настройки прокси задаются в профиле Stealth. Используйте ProxyIP и ProxyPort для получения адреса прокси.

Pascal

function UseProxy: Boolean;

Python

def UseProxy() -> bool: ...

Pascal Example

begin
  if UseProxy then
    AddToSystemJournal('Using proxy: ' + ProxyIP + ':' + IntToStr(ProxyPort))
  else
    AddToSystemJournal('Direct connection');
end.

Python Example

if UseProxy():
    AddToSystemJournal(f'Using proxy: {ProxyIP()}:{ProxyPort()}')
else:
    AddToSystemJournal('Direct connection')

See Also

ProxyIP, ProxyPort