openalias / dnscrypt-python

DNSCrypt Python Library
7 stars 2 forks source link

How to use this python implementation? #3

Open gb0519 opened 9 years ago

gb0519 commented 9 years ago

Thanks for the python implementation.

Can this project be used as a dnscrypt client? If it can, how to use it as a dnscrypt client? I can not find any description about that.

Or it is supposed to be a library and used in OpenAlias?

bdabkowski commented 9 years ago

It was created for use in OpenAlias, but definitely you can use it for other purposes.

The function to import and call is query. Sample usage

You need to give it target URL, information about your dnscrypt provider (ip, port, key, url) and the number of record type you wish to query for (for example, 16 for TXT). Also return_packet True/False decides whether the function returns the answer raw or converted to a packet.

Please note, some record types might not work properly - I needed to make a custom rule for type 48 for some reason.

gb0519 commented 9 years ago

Hi

I am trying to use dnscrypt-proxy on some small device. Because there is python shell on that device, So run python script is easier than coss-compile c code.

Thanks for your work and your reply!

I am not familiar with dns protocol, so maybe I need time to do some research. I will check it later.

gb0519@gmail.com

From: bdabkowski Date: 2015-09-29 06:27 To: openalias/dnscrypt-python CC: gb0519 Subject: Re: [dnscrypt-python] How to use this python implementation? (#3) It was created for use in OpenAlias, but definitely you can use it for other purposes. The function to import and call is query. Sample usage You need to give it target URL, information about your dnscrypt provider (ip, port, key, url) and the number of record type you wish to query for (for example, 16 for TXT). Also return_packet True/False decides whether the function returns the answer raw or converted to a packet. Please note, some record types might not work properly - I needed to make a custom rule for type 48 for some reason. ― Reply to this email directly or view it on GitHub.