Coder Social home page Coder Social logo

durian.cr's People

Contributors

636f7374 avatar ilmanzo avatar kalinon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

durian.cr's Issues

SRV record type support

SRV record resolving would help me a lot with a project I work on. I'm not sure how hard it is to implement, since I don't really have any idea how dns works below the surface level. Will you get to it at some point in the future or would it be more promising for me to read into it and try to implement it myself?

Rework for Durian.cr

Summary

  • Durian.cr Domain Name System Resolver features has been very complete.
  • However, the code of this repository is very messy and needs to be polished.
  • This repository has been two years old, and the processing logic has undergone tremendous changes in some places.
  • So, I think it is time to rework this repository.
  • There may be breaking changes. (Updated: Feb 10, 2021)

Error: undefined method 'connect' for TCPSocket.class

In lib/durian/src/durian/extra/http/client.cr:26:15

26 | TCPSocket.connect hostname, @PORT, resolver, @connect_timeout
^------
Error: undefined method 'connect' for TCPSocket.class

crystal: 0.35.1

durian:
    git: https://github.com/636f7374/durian.cr.git
    version: 0.1.4

Bug: Cache timeout under contention

Using the demo code here:

https://paste.sr.ht/~z64/05e1209fea4e2d465b75e232720fba1ca72c96f8

Produces output:

$ cr _test.cr google.com 5
...................................................
  0 | 48.33ms
  1 | 48.34ms
  2 | 5024.24ms
  3 | 5024.25ms
  4 | 5024.25ms

because the domain is never removed from the pending list once it is resolved.

The following patch resolves this problem: https://git.sr.ht/~z64/durian.cr/commit/663ca66477d80c2ab8757d8f51669d6dd0e7e328

$ cr _test.cr google.com 5
.
  0 | 51.47ms
  1 | 51.48ms
  2 | 51.48ms
  3 | 51.48ms
  4 | 51.48ms

Please feel free to apply this patch or resolve at your discretion.

Cannot resolve specific host

I have run into an issue attempting to use durian to resolve api.cognitive.microsoft.com. stdlib and other utilities can access and interact with this host fine, so it appears to be some issue with durian.. or perhaps I've misconfigured something?

I'm not that knowledgeable about DNS, so your help is appreciated.
I have example you can try here that fails: https://git.sr.ht/~z64/durian-issue-4/tree

Output is:

got std socket: #<TCPSocket:0x7fa845b91d10>
Unhandled exception: Invalid host address (Socket::Error)
  from lib/durian/src/durian/resolver.cr:223:17 in 'get_tcp_socket!'
  from src/durian-issue-4.cr:19:7 in '__crystal_main'
  from ../../../../../usr/lib/crystal/crystal/main.cr:105:5 in 'main_user_code'
  from ../../../../../usr/lib/crystal/crystal/main.cr:91:7 in 'main'
  from ../../../../../usr/lib/crystal/crystal/main.cr:114:3 in 'main'
  from __libc_start_main
  from _start
  from ???

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.