Code Monkey home page Code Monkey logo

Comments (13)

GoGoogle avatar GoGoogle commented on May 29, 2024 1

@GoGoogle Yes, working as expected. I have decided in case /etc/resolv.conf isn't available then the user must supply the nameserver themselves. That is why command 1 works, 2nd won't in your case because /etc/resolv.conf is missing in Android.

Ok.i see now.it is good enough.
Thank you very much.

from doggo.

mr-karan avatar mr-karan commented on May 29, 2024

Can you share more info on how did you install this? snap, docker, binary etc?

from doggo.

GoGoogle avatar GoGoogle commented on May 29, 2024

Can you share more info on how did you install this? snap, docker, binary etc?

I am download this link https://github.com/mr-karan/doggo/releases/download/v0.1.1/doggo_0.1.1_linux_arm64.tar.gz

And running with Termux.

from doggo.

mr-karan avatar mr-karan commented on May 29, 2024

@GoGoogle I tried replicating but I could not on my RPi 4. Can you share the contents of /etc/resolv.conf please? I suppose that file itself is missing.

For now you can give a nameserver manually and make it work:

doggo @1.1.1.1 github.com

It'll also help if you can tell me which device is this and show an output of dig github.com so I can figure out what's the default nameserver in your system.

I'm planning to hardcode 127.0.0.1 as the default nameserver in case reading /etc/resolv.conf also fails, which it did in your case. That should solve this :)

from doggo.

GoGoogle avatar GoGoogle commented on May 29, 2024

➜ ~ ./doggo @1.1.1.1 github.com ERROR[2020-12-22T04:16:06Z] error looking up DNS records error="open /etc/resolv.conf: no such file or directory"

from doggo.

GoGoogle avatar GoGoogle commented on May 29, 2024
➜  ~ dig github.com

; <<>> DiG 9.16.7 <<>> github.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12118
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;github.com.                    IN      A

;; ANSWER SECTION:
github.com.             59      IN      A       13.229.188.59

;; Query time: 30 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Tue Dec 22 12:18:19 CST 2020
;; MSG SIZE  rcvd: 55

from doggo.

GoGoogle avatar GoGoogle commented on May 29, 2024

@GoGoogle我尝试复制,但无法在我的RPi 4上进行/etc/resolv.conf。我想该文件本身丢失了。

现在,您可以手动指定一个名称服务器并使它工作:

doggo @1.1.1.1 github.com

如果您能告诉我这是哪台设备并显示输出,这也将有所帮助,dig github.com这样我就能弄清楚系统中的默认名称服务器是什么。

我计划将硬编码127.0.0.1作为默认的名称服务器,以防万一读取/etc/resolv.conf也失败了,这在您的情况下会发生。那应该解决这个问题:)

Android 10, lineageos 17.1 for sagit.

from doggo.

mr-karan avatar mr-karan commented on May 29, 2024

Noted. This is happening because /etc/resolv.conf itself is missing as suspected and I cannot parse the ndots / search list from there.

I'll need some time to fix this as it's related to #3 , expect a release soon. Thanks for providing the details!

from doggo.

GoGoogle avatar GoGoogle commented on May 29, 2024

Yep.
And,Thank you for your contribution.

from doggo.

mr-karan avatar mr-karan commented on May 29, 2024

@GoGoogle The fix is available in https://github.com/mr-karan/doggo/releases/tag/v0.2.0

from doggo.

GoGoogle avatar GoGoogle commented on May 29, 2024

@GoGoogle The fix is available in https://github.com/mr-karan/doggo/releases/tag/v0.2.0

➜  ~ ./doggo --help|grep v0
  v0.2.0 (4e5b074 2020-12-24T16:33:29Z) - unknown
➜  ~ ./doggo @1.1.1.1 github.com
NAME            TYPE    CLASS   TTL     ADDRESS         NAMESERVER
github.com.     A       IN      60s     192.30.255.113  1.1.1.1:53
➜  ~ ./doggo github.com
ERROR[2020-12-24T16:42:50Z] error loading nameservers                     error="error fetching system default nameserver"
➜  ~

Fixed half.
:D

from doggo.

mr-karan avatar mr-karan commented on May 29, 2024

@GoGoogle Yes, working as expected. I have decided in case /etc/resolv.conf isn't available then the user must supply the nameserver themselves. That is why command 1 works, 2nd won't in your case because /etc/resolv.conf is missing in Android.

from doggo.

FarrelF avatar FarrelF commented on May 29, 2024
TLDR

Just install the proot package in your Termux, copy-paste alias doggo="proot -b $PREFIX/etc/resolv.conf:/etc/resolv.conf doggo" to your ~/.bashrc, ~/.zshrc or fish config files, then restart Termux and you can execute doggo by just using doggo command without needing to supply nameservers manually.


Sorry for the very late response, this is not an ARM issue, but an Android issue itself as they don't have the /etc/resolv.conf file and Termux seems does not yet add this app in their repositories.

But, the solution for your case is to use PRoot to run doggo. First, make sure that you install the proot package in your Termux:

pkg i -y proot

If the proot package had successfully installed, you can run doggo with the following command:

proot -b $PREFIX/etc/resolv.conf:/etc/resolv.conf doggo <parameters>

These commands will bind $PREFIX/etc/resolv.conf on your Termux as /etc/resolv.conf file and the App will use that file when starts. You can change <parameters> with doggo parameters/arguments that you want to use.

This solution will not be perfect, but most features usually work. You can also add the PRoot command to run doggo as an alias in your ~/.bashrc, ~/.zshrc or fish config files for easier to execute the app if you want:

alias doggo="proot -b $PREFIX/etc/resolv.conf:/etc/resolv.conf doggo"

If you set the alias, you can directly execute doggo by just using the doggo command without needing to supply nameservers manually.

I hope this helps you :)

from doggo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.