9222,暴露端口让DOCKER访问,踩坑总结

2026-04-29 09:480阅读0评论SEO问题
  • 内容介绍
  • 文章标签
  • 相关推荐
问题描述:

新版本都无法跨IP访问,需要下面这么搞才可以让DOCKER访问远程的机器,实现扫码登录或者短信登录

“C:\Program Files\Google\Chrome\Application\chrome.exe” --remote-debugging-port=9222 --remote-debugging-address=0.0.0.0 --remote-allow-origins=* --user-data-dir=C:\temp\chrome_debug_profile

netsh interface portproxy add v4tov4 listenport=9222 listenaddress=0.0.0.0 connectport=9222 connectaddress=127.0.0.1

网友解答:
--【壹】--:

@echo off
chcp 65001 >nul 2>&1

echo ============================================
echo Chrome CDP Remote Debugging Setup
echo ============================================
echo.

echo [1/5] Closing Chrome…
taskkill /F /IM chrome.exe >nul 2>&1
timeout /t 2 /nobreak >nul

echo [2/5] Starting Chrome (CDP mode)…
start “” “C:\Program Files\Google\Chrome\Application\chrome.exe” --remote-debugging-port=9222 --user-data-dir=“C:\selenium” --remote-allow-origins=*
timeout /t 3 /nobreak

阅读全文
问题描述:

新版本都无法跨IP访问,需要下面这么搞才可以让DOCKER访问远程的机器,实现扫码登录或者短信登录

“C:\Program Files\Google\Chrome\Application\chrome.exe” --remote-debugging-port=9222 --remote-debugging-address=0.0.0.0 --remote-allow-origins=* --user-data-dir=C:\temp\chrome_debug_profile

netsh interface portproxy add v4tov4 listenport=9222 listenaddress=0.0.0.0 connectport=9222 connectaddress=127.0.0.1

网友解答:
--【壹】--:

@echo off
chcp 65001 >nul 2>&1

echo ============================================
echo Chrome CDP Remote Debugging Setup
echo ============================================
echo.

echo [1/5] Closing Chrome…
taskkill /F /IM chrome.exe >nul 2>&1
timeout /t 2 /nobreak >nul

echo [2/5] Starting Chrome (CDP mode)…
start “” “C:\Program Files\Google\Chrome\Application\chrome.exe” --remote-debugging-port=9222 --user-data-dir=“C:\selenium” --remote-allow-origins=*
timeout /t 3 /nobreak

阅读全文