<commit_before>﻿#DNSoverHTTPinGO

Introduction
------------

This proxy implementation is a follow－up works of DNSoverHTTP（https://github.com/BII-Lab/DNSoverHTTP）. Compared with the previous version, this works provides:

1. a go version end point which can be totally compatible with the FastCGI－version server with -support_version option. 

2. a go version Proxy server which optimized parallelizing with event-based lib. It should be noticed that this server is only compatible with the client in same repository without -support-version option

The great advantage to this approach is that HTTP usually makes it through
even the worst coffee shop or hotel room firewalls, since commerce may be at
stake. We also benefit from HTTP's persistent TCP connection pool concept,
which DNS on TCP/53 does not have. Lastly, HTTPS will work, giving privacy.

Construction
------------

To compile the code, make sure your have install golang 1.4 version and  already compiled go dns lib written by miekg(https://github.com/miekg/dns).You can find introduction's in miekg's github.To simply get and compile miekg's package in golang, just run:
	go get github.com/miekg/dns
	go build github.com/miekg/dns

Then you can compile the code in this repository by:
	go get github.com/BII-Lab/DNSoverHTTPinGO/
	go build github.com/BII-Lab/DNSoverHTTPinGO/ClientProxy
	go build github.com/BII-Lab/DNSoverHTTPinGO/ServerProxy

Server Installation
-------------------

The server proxy will need a working name server configuration on your server. The server should be reachable by UDP and TCP, and you should have a clear ICMP path to it, as well as full MTU (1500 octets or larger) and the ability to receive fragmented UDP (to make EDNS0 usable.)

1.compile ServerProxy.
	
	compile ServerProxy

2.make sure you have a working resolver.
3.run the ServerProxy as 
	
	./ServerProxy -proxy="[your resolver ip address]"

Client Installation
-------------------

The ClientProxy will listen on the port assigned(defaut port is 53). And it must also be told where are which type proxy service to connect to. If you want to connect to the FCGI proxy server(https://github.com/BII-Lab/DNSoverHTTP/tree/master/proxy_dns_fcgi) your need add a -support_version option. Both domain name or ip address for server proxy is acceptable. If you use a domain name, you need to set a resolver's IP address as a start point.

1. compile ClientProxy.
	
	compile ClientProxy
	<commit_msg>README updated<commit_after>﻿#DNSoverHTTPinGO

Introduction
------------

This proxy implementation is a follow－up works of DNSoverHTTP（https://github.com/BII-Lab/DNSoverHTTP）. Compared with the previous version, this works provides:

1. a go version end point which can be totally compatible with the FastCGI－version server with -support_version option. 

2. a go version Proxy server which optimized parallelizing with event-based lib. It should be noticed that this server is only compatible with the client in same repository without -support-version option

The great advantage to this approach is that HTTP usually makes it through
even the worst coffee shop or hotel room firewalls, since commerce may be at
stake. We also benefit from HTTP's persistent TCP connection pool concept,
which DNS on TCP/53 does not have. Lastly, HTTPS will work, giving privacy.

Construction
------------

To compile the code, make sure your have install golang 1.4 version and  already compiled go dns lib written by miekg(https://github.com/miekg/dns).You can find introduction's in miekg's github.To simply get and compile miekg's package in golang, just run:

	go get github.com/miekg/dns
	go build github.com/miekg/dns

Then you can compile the code in this repository by:

	go get github.com/BII-Lab/DNSoverHTTPinGO/
	go build github.com/BII-Lab/DNSoverHTTPinGO/ClientProxy
	go build github.com/BII-Lab/DNSoverHTTPinGO/ServerProxy

Server Installation
-------------------

The server proxy will need a working name server configuration on your server. The server should be reachable by UDP and TCP, and you should have a clear ICMP path to it, as well as full MTU (1500 octets or larger) and the ability to receive fragmented UDP (to make EDNS0 usable.)

1.compile ServerProxy.
	
	compile ServerProxy

2.make sure you have a working resolver.
3.run the ServerProxy as 
	
	./ServerProxy -proxy="[your resolver ip address]"

Client Installation
-------------------

The ClientProxy will listen on the port assigned(defaut port is 53). And it must also be told where are which type proxy service to connect to. If you want to connect to the FCGI proxy server(https://github.com/BII-Lab/DNSoverHTTP/tree/master/proxy_dns_fcgi) your need add a -support_version option. Both domain name or ip address for server proxy is acceptable. If you use a domain name, you need to set a resolver's IP address as a start point.

1. compile ClientProxy.
	
	compile ClientProxy
	
{'fraction_non_alphanumeric': 0.07420998980632008, 'fraction_numerical': 0.0069317023445463815, 'mean_word_length': 3.8098039215686272, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6281258', 'n_tokens_mistral': 1387, 'n_tokens_neox': 1305, 'n_words': 669}