Skip to content

Commit

Permalink
example
Browse files Browse the repository at this point in the history
  • Loading branch information
cofyc committed Nov 10, 2014
1 parent 210afcf commit 77ddbec
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 22 deletions.
11 changes: 11 additions & 0 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Example

A demo example.

## Usage

```
./start_wrapper.sh
./start_proxy.sh
dig www.google.com @127.0.0.1 -p 8855
```
1 change: 1 addition & 0 deletions example/crypt_public.key
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
k��M��`~|�O��t%o:��,���l�tT̨=
Expand Down
2 changes: 2 additions & 0 deletions example/crypt_secret.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"
�G*�p<�L�ī8;��bO�2�Z��0���
Binary file added example/dnscrypt.cert
Binary file not shown.
1 change: 1 addition & 0 deletions example/public.key
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6����"��g���Tq�1�h���l�%N;�z��$
1 change: 1 addition & 0 deletions example/secret.key
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
+Z}Rz��C���8��X; �0bAhXT ���6����"��g���Tq�1�h���l�%N;�z��$
5 changes: 5 additions & 0 deletions example/start_proxy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

dnscrypt-proxy -d -a 127.0.0.1:8855 -r 127.0.0.1:8854 \
--provider-name=2.dnscrypt-cert.yechengfu.com \
--provider-key=3686:91DF:DC22:8DBB:67BF:9EF6:5471:C831:B468:E0F8:18D9:6CB1:254E:3BE7:7A88:AB24
6 changes: 6 additions & 0 deletions example/start_wrapper.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

../dnscrypt-wrapper -d -a 0.0.0.0:8854 -r 8.8.8.8:53 \
--crypt-secretkey-file=crypt_secret.key \
--crypt-publickey-file=crypt_public.key --provider-cert-file=dnscrypt.cert \
--provider-name=2.dnscrypt-cert.yechengfu.com -VV
1 change: 0 additions & 1 deletion misc/README

This file was deleted.

1 change: 0 additions & 1 deletion misc/crypt_public.key

This file was deleted.

1 change: 0 additions & 1 deletion misc/crypt_secret.key

This file was deleted.

Binary file removed misc/dnscrypt.cert
Binary file not shown.
1 change: 0 additions & 1 deletion misc/public.key

This file was deleted.

1 change: 0 additions & 1 deletion misc/secret.key

This file was deleted.

19 changes: 2 additions & 17 deletions test.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
#!/bin/bash
#
# dnscrypt-wrapper:
#
# sudo ./dnscrypt-wrapper -r 8.8.8.8:53 --crypt-secretkey-file=./misc/crypt_secret.key --crypt-publickey-file=./misc/crypt_public.key --provider-name=2.dnscrypt-cert.yechengfu.com --provider-cert-file=./misc/dnscrypt.cert -VV -a 0.0.0.0:54
#
# dnscrypt-proxy:
#
# sudo ./dnscrypt-proxy -a 127.0.0.1:55 --provider-name=2.dnscrypt-cert.yechengfu.com -r 127.0.0.1:54 --provider-key=4298:5F65:C295:DFAE:2BFB:20AD:5C47:F565:78EB:2404:EF83:198C:85DB:68F1:3E33:E952 -m 100
#

for i in $(seq 1 32); do
(
server=127.0.0.1
port=53
port=8854
# udp
dig +short -p $port twitter.com @$server
dig +short -p $port yechengfu.com @$server
Expand All @@ -23,7 +14,7 @@ for i in $(seq 1 32); do
dig +short -p $port www.thelongestdomainnameintheworldandthensomeandthensomemoreandmore.com @$server +tcp +dnssec +cdflag +edns=0

server=127.0.0.1
port=55
port=8855
# udp through dnscrypt-proxy
dig +short -p $port twitter.com @$server
dig +short -p $port yechengfu.com.com @$server
Expand All @@ -32,9 +23,3 @@ for i in $(seq 1 32); do
dig +short -p $port yechengfu.com.com @$server +tcp
) &
done

for i in $(seq 1 32); do
(
for ((a=1; a <= 2048; a++)); do dig -p 54 @127.0.0.1 yahoo.com +tcp +dnssec +edns=0 +cdflag; done
) &
done

0 comments on commit 77ddbec

Please sign in to comment.