Skip to content
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

Connection refused on Termux #169

Closed
ViktorVoloshko opened this issue Mar 18, 2022 · 5 comments
Closed

Connection refused on Termux #169

ViktorVoloshko opened this issue Mar 18, 2022 · 5 comments

Comments

@ViktorVoloshko
Copy link

I'm using arm64 prebuilt binary in Termux and getting this:
~/wgcf $ ./wgcf_2.2.12_linux_arm64 register 2022/03/18 13:29:10 Using config file: wgcf-account.toml This project is in no way affiliated with Cloudflare Cloudflare's Terms of Service: https://www.cloudflare.com/application/terms/ ✔ Yes 2022/03/18 13:29:11 Post "https://api.cloudflareclient.com/v0a1922/reg": dial tcp: lookup api.cloudflareclient.com on [::1]:53: read udp [::1]:49078->[::1]:53: read: connection refused
On my Windows laptop with same WiFi spot wgcf working properly. What possibly can be wrong?

@ViRb3
Copy link
Owner

ViRb3 commented Mar 22, 2022

wgcf does not currently support Android. For a workaround that may or may not work, check: #31 (comment)

Otherwise, closing in favor of #79

@ViRb3 ViRb3 closed this as completed Mar 22, 2022
@ViktorVoloshko
Copy link
Author

ViktorVoloshko commented Mar 23, 2022

Thanks for answer, I think my Google is broken cause I tried to search but found nothing. There is a working non-root solution for Termux by Saito.Alex from 4PDA.
pkg upgrade
pkg install proot-distro
proot-distro install alpine
proot-distro login alpine --termux-home
apk -U upgrade
And after all we can use wgcf as in any other GNU/Linux distro. Our Alpine and Termux filesystems will be merged so if we already have wgcf we don't need to download it. But in case you don't have it:
mkdir wgcf
cd wgcf
wget LINK_FROM_GITHUB_HERE
Let's say downloaded file named wgcf, actually it will be something like wgcf_2.12_linux_arm64
chmod u+x wgcf
Now wgcf can be used as usual. After all simply use
exit to quit Alpine. Also there some sense in doing
termux-setup-storage
to copy generated config to main memory for importing.

@PoneyClairDeLune
Copy link

wgcf does not currently support Android. For a workaround that may or may not work, check: #31 (comment)

Otherwise, closing in favor of #79

@ViRb3 Please just offer a way for users to define a custom DNS server. That will solve the problem without any further complications. It just makes no sense to pin on [::1]:53.

@ViRb3
Copy link
Owner

ViRb3 commented Sep 5, 2023

@PoneyClairDeLune Unless I'm missing something, wgcf does not have any code that selects or pins the DNS server? It is all resolved via the OS. As far as I recall, this is a known issue where a binary compiled for Linux and then ran on Android has issues with the networking stack. Sure, we could add hacks to override that, but it would be better to just properly compile wgcf for Android instead. Happy to take PRs on that.

@Stan-Di
Copy link

Stan-Di commented Nov 13, 2023

Thanks for answer, I think my Google is broken cause I tried to search but found nothing. There is a working non-root solution for Termux by Saito.Alex from 4PDA. pkg upgrade pkg install proot-distro proot-distro install alpine proot-distro login alpine --termux-home apk -U upgrade And after all we can use wgcf as in any other GNU/Linux distro. Our Alpine and Termux filesystems will be merged so if we already have wgcf we don't need to download it. But in case you don't have it: mkdir wgcf cd wgcf wget LINK_FROM_GITHUB_HERE Let's say downloaded file named wgcf, actually it will be something like wgcf_2.12_linux_arm64 chmod u+x wgcf Now wgcf can be used as usual. After all simply use exit to quit Alpine. Also there some sense in doing termux-setup-storage to copy generated config to main memory for importing.

I solved this problem without installing proot in Termux:

pkg install golang
wget https://github.com/ViRb3/wgcf/archive/refs/tags/v2.2.19.tar.gz
tar xzf v2.2.19.tar.gz
cd wgcf-2.2.29
go build

After building in termux wgcf working fine!

img 2023-11-13 в 09 32 58_6766eb81

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants