Skip to content

API UO ProxyIP en

Codex edited this page Sep 23, 2026 · 1 revision

UO.ProxyIP

ClassicUO / Basic IDE

Home · API · Proxy

Reads the proxy host selected for the current profile, for checking the route before connecting.

Exact syntax

UO.ProxyIP() -> Any

Parameters

No parameters.

Returns

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.

Behavior

  • 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.

Internal functions: from call to result

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.

1. ExecuteLegacyManualAlias

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.

2. ProxyAddress

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.

Examples

UO.ProxyIP — 1

# UO.ProxyIP1
#
# 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 SUB

Parameter 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

# UO.ProxyIP2
#
# 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 SUB

Parameter 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

# UO.ProxyIP3
#
# 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 SUB

Parameter 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 · 繁體中文 · 日本語 · 한국어

Clone this wiki locally