Giter Club home page Giter Club logo

dns64's Introduction

DNS64_getaddrinfo License

Brief Description With the lack of ipv4 address,many countries are promoting ipv6. The code is to solve the problem that ipv6 host has a access to ipv4(including:1.the IPv6 Internet to an IPv4 network,2.an IPv6 network to the IPv4 Internet,3.an IPv6 network to an IPv4 network).Learning from the APPLE ios9.2 getaddrinfo API,We know that Apple ensure IPv6 DNS64/NAT64 Compatibility.

I have a test for the APPLE's API.

Testing environment:

  • IPV6-only network by apple mac ox sharing
  • iphone6s version:10.2

Testing way:

  • I invoke the getaddrinfo to query the ipv6_addr of ipv4_only domains

Testing result:

  • analyse the returned value of getaddrinfo,I find that the api Getaddrinfo synthesizes the IPv4 address to an IPv6 address by the preifx 2001:2:0:1baa::,which means Apple company set up own DNS64/NAT64 server,the nat64 router prefix is 2001:2:0:1baa::.

OK.... My project is to provide a interface that inputting domain or ipv4_addr will return ipv4_mapped ipv6 address.   The code is completely written in C.Currently it is only tested on ubuntu 16.04.

Method

Three public Dns64 servers.

1.2001:67c:27e4:15::64

2.2001:67c:27e4:15::6411

3.2001:67c:27e4::60

step

1.Combine dnsquery packet
2.send to dns64 server(multi_pthread,once one pthread success,return)
3.revefrom (Nonblocking,timeout default 3seconds)
4.analyse revePacket
5.cycle 3 times if revefrom success, break.
6.if 3 times is all failed,try api getaddrinfo

if the input is ipv4 address.

1.get nat64 prefix(RFC 6052,reference to the code)

2.replace ()

How to Build in ubuntu

  1. make sure support ipv6-stack(eg:sudo apt-get install miredo)

  2. run scripting language ./start.sh

dns64's People

Contributors

bmei1314 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.