Code Monkey home page Code Monkey logo

Comments (6)

LenardHess avatar LenardHess commented on June 2, 2024 2

One way to work around this is using the web-skip parameter to skip part of the reply. I tried setting it to \n\n to skip the HTTP headers and it worked for me:

$ ddclient -query -web ipv4.icanhazip.com -web-skip='\n\n'
----- Test_possible_ip with 'get_ip' -----
...
use=web, web=ipv4.icanhazip.com address is 84.xxx.xxx.xxx
...

It might make sense to change the default skip value to that. I'd assume most IP querying sites will return the IP in the HTTP body, not the headers - and IPs in headers could always happen.

from ddclient.

mattlunn avatar mattlunn commented on June 2, 2024 1

Thank you for that @LenardHess Would I need to modify the /etc/ddclient.conf file to apply this solution and if so, what would I need to modify? I've added web-skip to the following line to no avail: use=web, web=https://ipv4.icanhazip.com, web-skip='\n\n'

I couldn't get this to work with the ddclient.conf file, so ended up swapping to use https://api.ipify.org/ instead;

use=web, web=api.ipify.org

from ddclient.

DMBuce avatar DMBuce commented on June 2, 2024 1

Would I need to modify the /etc/ddclient.conf file to apply this solution and if so, what would I need to modify?

I was able to add web-skip to ddclient.conf by escaping the backslashes:

use=web
web=https://icanhazip.com
web-skip='\\n\\n'

from ddclient.

taumataa avatar taumataa commented on June 2, 2024

Thank you for that @LenardHess
Would I need to modify the /etc/ddclient.conf file to apply this solution and if so, what would I need to modify?
I've added web-skip to the following line to no avail:
use=web, web=https://ipv4.icanhazip.com, web-skip='\n\n'

from ddclient.

spencerhughes avatar spencerhughes commented on June 2, 2024

I just wanted to chime in and say that I also experienced this issue; it gave me a tiny heart attack because 1.0.1.1 seems to be a Chinese IP and I'd thought my security had been compromised.

from ddclient.

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.