Skip to content

API UO ProxyPort en

Codex edited this page Sep 23, 2026 · 1 revision

UO.ProxyPort

ClassicUO / Basic IDE

Home · API · Proxy

Reads the proxy port selected for the current profile, for checking a host/port pair.

Exact syntax

UO.ProxyPort() -> Any

Parameters

No parameters.

Returns

Integer: configured proxy port, 1..65535; 0 for a direct connection. This is not the game-server port.

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 port selected for the current profile, for checking a host/port pair.

Integer: configured proxy port, 1..65535; 0 for a direct connection. This is not the game-server port.

Project source: external/InjectionScript/src/InjectionScript/Runtime/InjectionApiUO.cs; function ExecuteLegacyManualAlias.

2. ProxyPort

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.

Integer: configured proxy port, 1..65535; 0 for a direct connection. This is not the game-server port.

Project source: src/ClassicUO.Client/Game/Managers/ClassicUOInjectionApiBridge.cs; function ProxyPort.

Examples

UO.ProxyPort — 1

# UO.ProxyPort1
#
# Reads the proxy port selected for the current profile, for checking a host/port pair.
#
# Integer: configured proxy port, 1..65535; 0 for a direct connection. This is not the
# game-server port.

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.ProxyPort()
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.ProxyPort — 2

# UO.ProxyPort2
#
# Reads the proxy port selected for the current profile, for checking a host/port pair.
#
# Integer: configured proxy port, 1..65535; 0 for a direct connection. This is not the
# game-server port.

SUB Main()
    # RouteLabel creates a readable label from the same session: host:port for a proxy or "direct"
    # for a direct connection. It does not reveal an account or password.

    RETURN RouteLabel()
END SUB

SUB RouteLabel()
    IF UO.UseProxy() THEN
        RETURN UO.ProxyIP() + ":" + CStr(UO.ProxyPort())
    END IF
    RETURN "direct"
END SUB

Parameter and execution notes:

  • RouteLabel creates a readable label from the same session: host:port for a proxy or "direct" for a direct connection. It does not reveal an account or password.

UO.ProxyPort — 3

# UO.ProxyPort3
#
# Reads the proxy port selected for the current profile, for checking a host/port pair.
#
# Integer: configured proxy port, 1..65535; 0 for a direct connection. This is not the
# game-server port.

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