huan / docker-wechat

DoChat is a Dockerized WeChat (盒装微信) PC Windows Client for Linux
https://hub.docker.com/r/zixia/wechat
Apache License 2.0
2.23k stars 199 forks source link

DoChat can not use "Chat History Migration & Backup" feature #225

Closed 643104191 closed 3 months ago

643104191 commented 3 months ago

Although I know it should be a network issue with Docker containers, I'm still wondering if there are feasible solutions other than using a VPN to create a local network.

huan commented 3 months ago

That's a brilliant feature request!

I'm also interested in it.

643104191 commented 3 months ago

Is there any solution approach? I recently learned about hooking in PC WeChat, but I’m not sure if it’s helpful for this issue.

643104191 commented 3 months ago

This issue has been resolved by using the docker network create command. The specific process is as follows:

  1. By using commands like netstat, we discovered that when WeChat synchronizes chat records, it communicates by instructing the mobile phone to access the current WeChat runtime environment's IP address along with port 8000.
  2. However, the problem arises when containers do not specify network configurations. In such cases, the container's IP address defaults to 172.17.0.2/16.
  3. To address this, we created a network identical to the host machine's network and then exposed port 8000 using the -p flag.