To reach the Appium server through an intermediary, configure Python's HTTP command channel:

from appium import webdriver
from appium.webdriver.client_config import AppiumClientConfig
from selenium.webdriver.common.proxy import Proxy, ProxyType

route = Proxy()
route.proxy_type = ProxyType.MANUAL
route.http_proxy = 'http://proxy.example:8080'
route.ssl_proxy = 'http://proxy.example:8080'

config = AppiumClientConfig(
    remote_server_addr='https://appium.example',
    proxy=route,
)
driver = webdriver.Remote(
    options=device_options,
    client_config=config,
)

device_options is the application's existing options object. Keep its device/browser capabilities and manage driver.quit through the existing test lifecycle.

AppiumClientConfig inherits Selenium's ClientConfig. Manual selection uses http_proxy for an HTTP server address and ssl_proxy for an HTTPS address. Here the values include the URL scheme because they configure the HTTP connection manager. For an Appium endpoint reachable over an allowed public route, choose an HTTP candidate from the HTTP proxy list for these values.

A proxy capability sent inside the session asks the remote environment to route its own traffic. It cannot help Python submit the earlier session-creation request. Configure that other path separately when needed.

Use a compatible Appium/Selenium pair exposing this public interface. Patching an installed remote_connection module targets older client arrangements rather than this configuration path.

Winndannde jowitiiɗe heen