Choose the constructor branch first. If simple-salesforce creates its own Requests Session, use its public proxies mapping. If you supply a Session, that object owns routing and the separate mapping is ignored with a warning.

With an existing token and instance URL, the default-session branch is:

from simple_salesforce import Salesforce

sf = Salesforce(
    instance_url='https://org.example.my.salesforce.com',
    session_id=access_token,
    proxies={'https': 'http://proxy.example:8080'},
)

Use the actual Salesforce instance and access token. The value is an HTTP intermediary for HTTPS API calls. For an allowed public Salesforce endpoint route without proxy authentication, an HTTP proxy list entry can supply that URL; the Salesforce token remains separate. For constructor-driven login, provide the mapping at construction so the login helper receives it before obtaining the session.

For a custom Session, configure it directly:

import requests

session = requests.Session()
session.proxies.update({'https': 'http://proxy.example:8080'})
sf = Salesforce(
    instance_url=instance_url,
    session_id=access_token,
    session=session,
)

The custom object's normal Requests environment behavior remains active. Keep that route on the constructor path the SDK uses; configuring a separate client beside it does not affect these calls.

འབྲེལ་བའི་རྩོམ་ཡིག