-
Notifications
You must be signed in to change notification settings - Fork 0
API UO ProxyIP en
ClassicUO / Basic IDE
Reads the proxy host selected for the current profile, for checking the route before connecting.
UO.ProxyIP() -> Any
No parameters.
String: the configured proxy IP or DNS host name. Empty string for a direct connection. A DNS name is not resolved by this call; this is not the game-server address.
- No arguments. Reads the configuration owned by this session, including while offline. It does not enable, disable or contact a proxy, reconnect, or reveal credentials. Standalone Full without a managed proxy returns the direct-connection values. Edit the profile and restart its session to apply connection changes; both the login and game transport use that profile configuration.
No arguments. Reads the configuration owned by this session, including while offline. It does not enable, disable or contact a proxy, reconnect, or reveal credentials. Standalone Full without a managed proxy returns the direct-connection values. Edit the profile and restart its session to apply connection changes; both the login and game transport use that profile configuration.
Reads the proxy host selected for the current profile, for checking the route before connecting.
String: the configured proxy IP or DNS host name. Empty string for a direct connection. A DNS name is not resolved by this call; this is not the game-server address.
Project source: external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs; function ExecuteLegacyManualAlias.
No arguments. Reads the configuration owned by this session, including while offline. It does not enable, disable or contact a proxy, reconnect, or reveal credentials. Standalone Full without a managed proxy returns the direct-connection values. Edit the profile and restart its session to apply connection changes; both the login and game transport use that profile configuration.
String: the configured proxy IP or DNS host name. Empty string for a direct connection. A DNS name is not resolved by this call; this is not the game-server address.
Project source: src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs; function ProxyAddress.
# UO.ProxyIP — 1
#
# Reads the proxy host selected for the current profile, for checking the route before
# connecting.
#
# String: the configured proxy IP or DNS host name. Empty string for a direct connection. A DNS
# name is not resolved by this call; this is not the game-server address.
SUB Main()
# Main returns the current setting. With proxy.example.invalid:1080 configured the address is
# "proxy.example.invalid", the port is 1080 and UseProxy is 1. Direct connection gives "", 0 and
# 0 respectively. The sample domain is a placeholder, not a working proxy.
RETURN UO.ProxyIP()
END SUBParameter and execution notes:
- Main returns the current setting. With proxy.example.invalid:1080 configured the address is "proxy.example.invalid", the port is 1080 and UseProxy is 1. Direct connection gives "", 0 and 0 respectively. The sample domain is a placeholder, not a working proxy.
# UO.ProxyIP — 2
#
# Reads the proxy host selected for the current profile, for checking the route before
# connecting.
#
# String: the configured proxy IP or DNS host name. Empty string for a direct connection. A DNS
# name is not resolved by this call; this is not the game-server address.
SUB Main()
# The allowlist has two exact permitted host strings. The loop checks the currently configured
# host only when UseProxy is true. It returns 1 for a match and 0 otherwise. Replace the example
# names; this does not verify the remote proxy identity.
DIM allowed[1]
allowed[0] = "proxy.example.invalid"
allowed[1] = "127.0.0.1"
IF UO.UseProxy() THEN
VAR index = 0
WHILE index < GetArrayLength(allowed)
IF UO.ProxyIP() = allowed[index] THEN
RETURN 1
END IF
index = index + 1
WEND
END IF
RETURN 0
END SUBParameter and execution notes:
- The allowlist has two exact permitted host strings. The loop checks the currently configured host only when UseProxy is true. It returns 1 for a match and 0 otherwise. Replace the example names; this does not verify the remote proxy identity.
# UO.ProxyIP — 3
#
# Reads the proxy host selected for the current profile, for checking the route before
# connecting.
#
# String: the configured proxy IP or DNS host name. Empty string for a direct connection. A DNS
# name is not resolved by this call; this is not the game-server address.
SUB Main()
# RequireRoute receives address="proxy.example.invalid", port=1080. It checks all three settings
# before UO.Connect. A mismatch returns 0 without connecting. A match requests connection and
# returns 1; that is a request, not proof of a successful login. Replace both placeholders and
# check UO.Connected separately.
RETURN RequireRoute("proxy.example.invalid",1080)
END SUB
SUB RequireRoute(address,port)
IF NOT UO.UseProxy() THEN
RETURN 0
END IF
IF UO.ProxyIP() <> address OR UO.ProxyPort() <> port THEN
RETURN 0
END IF
UO.Connect()
RETURN 1
END SUBParameter and execution notes:
- RequireRoute receives address="proxy.example.invalid", port=1080. It checks all three settings before UO.Connect. A mismatch returns 0 without connecting. A match requests connection and returns 1; that is a request, not proof of a successful login. Replace both placeholders and check UO.Connected separately.
Русский · English · Українська · Français · Deutsch · Italiano · Español · 繁體中文 · 日本語 · 한국어
ClassicUO
Bad Newbie & Basic IDE
Найти в справочнике
Клиент и скрипты
Каталоги значений
Разработка и помощь