Skip to content

Unable to use SOCKS5 authenticated proxies #3847

Closed
@sonce

Description

@sonce
proxy = f"socks5://username:password@server:6001"

# 使用 with 语句管理浏览器实例
base_dir = os.path.dirname(os.path.abspath(__file__))
user_data_dir = os.path.join(base_dir, "user_datas", self.email)
            
sb_lock.acquire()
with SB(
    # wire=True,
    uc=True,
    locale="en",
    # block_images=conf.BLOCK_IMAGES,
    # uc_subprocess=True,
    # incognito=True,
    # multi_proxy=True,
    user_data_dir=user_data_dir,
    ) as self.sb:
        sb_lock.release()
        if proxy:
                    self.sb.proxy={
                        "http": proxy,
                        "https": proxy,
                        "no_proxy": "localhost,127.0.0.1",
                    }
        self.sb.activate_cdp_mode("https://ip.sb")
        self.sb.wait_for_ready_state_complete(timeout=2)

the proxy not work
ip.sb show my local ip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    UC Mode / CDP ModeUndetected Chromedriver Mode / CDP ModeduplicateThe answer/solution already exists somewhereinvalid usageYou may need to change what you're doing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions