-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
request a feature to change the endpoint ip:port #29
Comments
Hi @Neomanbeta That can be possible, if you can provide the minimal implementation about changing the |
Thank you for the reply, since I know absolutely nothing about docker or coding, I don't know whether I could provide any useful information you need, but i will try my best. The part I need to change is "server": "engage.cloudflareclient.com" and "server_port": 2408, this is the part warp uses by default. |
@Neomanbeta do you mean you can change the If so, can u provide further testing without |
Not to change the warp endpint from sing-box, sing-box merely uses warp config that is written in its own format. This is the bat file content the article uses to change it, I translated a little bit for better understanding. chcp 936 Also, in other 3rd party warp client, such as WGCF |
@Neomanbeta cool. I guess you want to change directly inside If so, can u provide the valid And for clarity, it would be best, if you can provide the config file, before and after. For this project, if u would like to set and test, just modify the produced file inside: Docker-Warp-Socks/entrypoint.sh Line 25 in 8edbfe0
|
I would like to help you with that, but unfortunately I don't use wgcf myself, so I do not have the wgcf-profile.conf nor the config file you need. EDITED: just realized you have given me the wgcf-profile.conf file location to modify myself, I will try then get back to you. |
@Neomanbeta Once you test your proposal that works on the block area, can u submit a PR to this project? I believe lots of people will benefit from that :) |
It seems to be working right now. TBH I have no idea how.....Here is the test log. It took me days to setup my debian server with ipv6 and create a ipv6 bridge in docker, that was an extremely painful process, because only ipv6 endpoint ip works here. root@D525-smallserver:~ curl --proxy socks5h://127.0.0.1:9091 https://www.cloudflare.com/cdn-cgi/trace So it proves that change the endpoint ip&port is a working approach to solve the connection issue in places where engage.cloudflareclient.com:2048 cannot connect. PS: As i said above, i know nothing about coding, so I don't know how to do a pull request, sorry. |
I don't know where does it go wrong. It can pass the test inside the docker terminal; It can pass the test on the host machine as well: But I cannot connect from my local network, I've checked the iptables, everything is fine, docker automatically modified the iptables when deployed. |
I think I've located the problem. Since I can only replace endpoint with an ipv6 address & port, I've created a docker bridge network with ipv6 support. By default this project creates a bridge network with only ipv4. warp_socks | 2024/07/01 23:01:18 Successfully generated WireGuard profile: wgcf-profile.conf I think this is the reason why access outside the host couldn't connect. If I use the default ipv4 bridge that was created automatically, it doesn't have this problem, yet it does not support the ipv6 endpoint, which makes it useless. |
Hi, @Neomanbeta Thanks for your test result. If I understand correctly, you are trying to modify the wireguard config file from It seems you meet a problem when handling ipv6 endpoint, do u try to replace the ipv4 endpoint? |
Yes, I go straight to the folder where wgcf-profile.conf is located, then modify the endpoint ip & port and restart the docker. |
@Neomanbeta thanks for your update. As I know, the current issue is the ipv6 proxy part from container to host cannot be established. Or if u can test on the host directly use same wireguard config with ipv6 endpoint specific? |
I'm not sure what you mean, but if you mean even with the current issue at hand, can I use terminal to login the docker and execute curl? Then the answer is yes. I've already posted the curl test result from inside the docker in the previous post, the test passed. / # curl -f https://ip.sb/cdn-cgi/trace There is no need to test the wireguard config with ipv6 endpoint on the host, because I know it works. Because this is how I use WARP right now. |
So this issue has been solved now, right? |
No, the problem is still there. |
ipv4 or ipv6?
It was designed, not broken.
In which case? ipv4 or ipv6? original hostname or modified endpoint? |
1: ipv6, I cannot use ipv4 endpoint ips, they are all blocked. |
okay, can u abstract your operation into one command line without extra interaction, so I can add this feature as u first requested. |
Say the ipv6 ip&port I want to change to is 2606:4700:d0::3ed0:74ce:7f61:70be:3476 |
If the test on https://github.com/Mon-ius/Docker-Warp-Socks#13-test-and-verify works fine, it's not a problem. If not, I will fix it. |
I hope i'm getting this right. |
I hope there are no issues for now. Regarding the initial issue, I will find time to provide an extra option to replace the endpoint. However, the problem you proposed, Accessing the current device from outside of the network, is beyond the current project's capabilities at this time. Given that such an option may lead to abuse, we will release similar feature in version 3 once we find a proper way to limit such situations 🤗 |
OK, i see, thanks for the help. |
@Neomanbeta Hi, I got some time for apply your previous request to the mainstream. Before that I would like to perform more testing case for both IPV4 and IPV6 on your suggested area. I saw you first provide the singbox then the wireguard config, however, they dont work at current time, would u plz suggestion the new endpoint cases to replace |
@Neomanbeta wake up give us an update please |
close due to no response |
Sorry if i can't make myself clear, the thing is warp endpoint ips are heavily blocked in China, both ipv4 and ipv6, but it's still possible to find available endpoint ips to connect, as long as we can change it ourselves.
Like in this thread: ViRb3/wgcf#69
However, i cannot find a way to do it when deploying this project. Here is the log when I start the docker.
clientmethod: none
client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: error
}
socks pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
}
[#] ip link add warp type wireguard
[#] wg setconf warp /dev/fd/63
[#] ip -4 address add 172.16.0.2/32 dev warp
[#] ip -6 address add 2606:4700:110:8e2d:31c0:2cfc:4dc5:518/128 dev warp
[#] ip link set mtu 1280 up dev warp
[#] resolvconf -a warp -m 0 -x
[#] wg set warp fwmark 51820
[#] ip -6 route add ::/0 dev warp table 51820
[#] ip -6 rule add not fwmark 51820 table 51820
[#] ip -6 rule add table main suppress_prefixlength 0
[#] ip6tables-restore -n
[#] ip -4 route add 0.0.0.0/0 dev warp table 51820
[#] ip -4 rule add not fwmark 51820 table 51820
[#] ip -4 rule add table main suppress_prefixlength 0
[#] sysctl -q net.ipv4.conf.all.src_valid_mark=1
[#] iptables-restore -n
[#] ip -4 rule add from 172.21.0.2/16 lookup main
[#] ip -6 rule add from fe80::42:acff:fe15:2/64 lookup main
curl: (6) Could not resolve host: www.cloudflare.com
Jun 27 16:19:19 (1719505159.034517) rws-cli[1]: info: Dante/server[1/1] v1.4.3 running
Jun 27 16:24:53 (1719505493.027793) rws-cli[353]: info: block(1): tcp/connect ]: 127.0.0.1.34906 127.0.0.1.9091: could not resolve hostname "www.cloudflare.com": Try again
Jun 27 16:24:53 (1719505493.028577) rws-cli[353]: info: block(1): tcp/accept ]: 127.0.0.1.34906 127.0.0.1.9091: request was not performed due to error: could not resolve hostname "www.cloudflare.com": Try again
Jun 27 16:27:37 (1719505657.243113) rws-cli[1]: info: sigterm(): exiting on signal 15
Jun 27 16:27:37 (1719505657.245301) rws-cli[1]: alert: mother[1/1]: shutting down
So, i would like to know, is it possible to implement a feature to manually change the endpoint (Endpoint = engage.cloudflareclient.com:2408) before the docker starts?
The text was updated successfully, but these errors were encountered: