Skip to content
This repository was archived by the owner on Jun 4, 2021. It is now read-only.

Commit 85865c8

Browse files
authored
Merge branch 'master' into add-aws-roles
2 parents a5793f6 + 00e08e2 commit 85865c8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+458
-301
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ env:
1616
- RUN="ci" SITE="tests/site_vars/openvpn.yml"
1717
- RUN="ci" SITE="tests/site_vars/shadowsocks.yml"
1818
- RUN="ci" SITE="tests/site_vars/ssh.yml"
19+
- RUN="ci" SITE="tests/site_vars/cloudflared.yml"
1920
- RUN="ci" SITE="random"
2021

2122
before_install:
@@ -25,7 +26,7 @@ before_install:
2526
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 762E3157
2627

2728
install:
28-
- pip install ansible==2.6.5
29+
- pip install ansible==2.8.0
2930
- pip install urllib3 yamllint
3031
- ansible --version
3132

LICENSE

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ Modifications to the L2TP/IPsec configuration files are licensed
1212
under CC Attribution-ShareAlike 3.0 Unported
1313
(http://creativecommons.org/licenses/by-sa/3.0/).
1414

15+
Cloudflared DNS-over-HTTPS role courtesy of Steven Foerster
16+
(https://github.com/sfoerster/ansible-cloudflared).
17+
Copyright 2019 Steven Foerster, and based on the work of
18+
Ben Dews (Copyright 2018).
19+
1520
This program is free software: you can redistribute it and/or modify
1621
it under the terms of the GNU General Public License as published by
1722
the Free Software Foundation, either version 3 of the License, or

README-chs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<p align="center">
2-
<img src="https://raw.githubusercontent.com/jlund/streisand/master/logo.jpg" alt="Automate the effect"/>
2+
<img src="https://raw.githubusercontent.com/jlund/streisand/master/logo.jpg" alt="Automate the effect"/>
33
</p>
44

55
- - -
@@ -141,7 +141,7 @@ Streisand 运行在**你自己的计算机上时(或者你电脑的虚拟机
141141
sudo pip install "apache-libcloud>=1.17.0"
142142
* Linode
143143

144-
sudo pip install linode-python
144+
sudo pip install linode-api4
145145
* Rackspace 云
146146

147147
sudo pip install pyrax

README-ru.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<p align="center">
2-
<img src="https://raw.githubusercontent.com/jlund/streisand/master/logo.jpg" alt="Automate the effect"/>
2+
<img src="https://raw.githubusercontent.com/jlund/streisand/master/logo.jpg" alt="Automate the effect"/>
33
</p>
44

55
- - -
@@ -149,7 +149,7 @@
149149

150150
* Linode
151151

152-
sudo pip install linode-python
152+
sudo pip install linode-api4
153153
* Rackspace Cloud
154154

155155
sudo pip install pyrax

Services.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Services Provided
2020
* When enabled, the high-performance [libev variant](https://github.com/shadowsocks/shadowsocks-libev) is installed. This version is capable of handling thousands of simultaneous connections.
2121
* A QR code is generated that can be used to automatically configure the Android and iOS clients by simply taking a picture. You can tag '8.8.8.8' on that concrete wall, or you can glue the Shadowsocks instructions and some QR codes to it instead!
2222
* [AEAD](https://shadowsocks.org/en/spec/AEAD-Ciphers.html) support is enabled using ChaCha20 and Poly1305 for enhanced security and improved GFW evasion.
23-
* The [simple-obfs](https://github.com/shadowsocks/simple-obfs) plugin is installed to provide robust traffic evasion on hostile networks (especially those implementing quality of service (QOS) throttling).
23+
* The [v2ray-plugin](https://github.com/shadowsocks/v2ray-plugin) plugin is installed to provide robust traffic evasion on hostile networks (especially those implementing quality of service (QOS) throttling).
2424
* [sslh](https://www.rutschle.net/tech/sslh/README.html)
2525
* Sslh is a protocol demultiplexer that allows Nginx, OpenSSH, and OpenVPN to share port 443. This provides an alternative connection option and means that you can still route traffic via OpenSSH and OpenVPN even if you are on a restrictive network that blocks all access to non-HTTP ports.
2626
* [Stunnel](https://www.stunnel.org/index.html)
@@ -37,3 +37,5 @@ Services Provided
3737
* Your Streisand server is configured to automatically install new security updates.
3838
* [WireGuard](https://www.wireguard.com/)
3939
* Linux users can take advantage of this next-gen, simple, kernel-based, state-of-the-art VPN that also happens to be ridiculously fast and uses modern cryptographic principles that all other highspeed VPN solutions lack.
40+
* [Cloudflared DNS-over-HTTPS](https://developers.cloudflare.com/1.1.1.1/dns-over-https/)
41+
* Even when you are visiting a site using HTTPS, by default your DNS query is sent over an unencrypted connection (between the Streisand server and upstream DNS servers). With Streisand's DNS-over-HTTPS service provided by the cloudflared client enabled, your DNS queries are blocked from view by the cloud provider hosting your Streisand server and everyone in between them and the upstream DNS server. The DNS reply from the upstream server is also protected from both view and tampering on its way back to your Streisand server.

global_vars/default-site.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ vpn_clients: 5
1414
streisand_openconnect_enabled: yes
1515
streisand_openvpn_enabled: yes
1616
streisand_shadowsocks_enabled: yes
17+
streisand_shadowsocks_v2ray_enabled: no
1718
streisand_ssh_forward_enabled: yes
1819
# By default sshuttle is disabled because it creates a `sshuttle` user that has
1920
# full shell privileges on the Streisand host
@@ -22,3 +23,4 @@ streisand_stunnel_enabled: yes
2223
streisand_tinyproxy_enabled: yes
2324
streisand_tor_enabled: no
2425
streisand_wireguard_enabled: yes
26+
streisand_cloudflared_enabled: yes

global_vars/globals.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
---
2+
3+
# If using regular cleartext DNS then dnsmasq will set these upstream DNS servers
24
upstream_dns_servers:
3-
- 8.8.8.8
4-
- 8.8.4.4
5+
- 1.1.1.1
6+
- 1.0.0.1
7+
8+
# If using DNS-over-HTTPS with cloudflared then the upstream servers and queries can be set in:
9+
# playbooks/roles/cloudflared/defaults/main.yml
510

611
streisand_client_test: no
712

global_vars/noninteractive/amazon-site.yml

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,11 @@ streisand_tor_enabled: no
2727
streisand_wireguard_enabled: yes
2828

2929
# The AWS region number.
30-
# 1. US East (N. Virginia)
31-
# 2. US East (Ohio)
32-
# 3. US West (N. California)
33-
# 4. US West (Oregon)
34-
# 5. Canada (Central)
35-
# 6. EU (Frankfurt)
36-
# 7. EU (Ireland)
37-
# 8. EU (London)
38-
# 9. EU (Paris)
39-
# 10. Asia Pacific (Tokyo)
40-
# 11. Asia Pacific (Seoul)
41-
# 12. Asia Pacific (Osaka-Local)
42-
# 13. Asia Pacific (Singapore)
43-
# 14. Asia Pacific (Sydney)
44-
# 15. Asia Pacific (Mumbai)
45-
# 16. South America (São Paulo)
30+
#
31+
# See ./playbooks/amazon.yml for numbering.
4632
#
4733
# Note: aws_region_var must be a number in quotes, e.g. "3" not 3.
48-
aws_region_var: "3"
34+
aws_region_var: "16"
4935

5036
# The VPC and subnet IDs to use. They can be empty strings to indicate that a
5137
# VPC will not be used.

playbooks/amazon.yml

Lines changed: 41 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,26 @@
66
gather_facts: yes
77

88
vars:
9+
# The region dict is generated from ./util/print-aws-regions.py
910
regions:
10-
"1": "us-east-1"
11-
"2": "us-east-2"
12-
"3": "us-west-1"
13-
"4": "us-west-2"
14-
"5": "ca-central-1"
15-
"6": "eu-central-1"
16-
"7": "eu-west-1"
17-
"8": "eu-west-2"
18-
"9": "eu-west-3"
19-
"10": "ap-northeast-1"
20-
"11": "ap-northeast-2"
21-
"12": "ap-northeast-3"
22-
"13": "ap-southeast-1"
23-
"14": "ap-southeast-2"
24-
"15": "ap-south-1"
25-
"16": "sa-east-1"
26-
"17": "eu-north-1"
11+
"1": "ap-east-1"
12+
"2": "ap-northeast-1"
13+
"3": "ap-northeast-2"
14+
"4": "ap-northeast-3"
15+
"5": "ap-south-1"
16+
"6": "ap-southeast-1"
17+
"7": "ap-southeast-2"
18+
"8": "ca-central-1"
19+
"9": "eu-central-1"
20+
"10": "eu-north-1"
21+
"11": "eu-west-1"
22+
"12": "eu-west-2"
23+
"13": "eu-west-3"
24+
"14": "sa-east-1"
25+
"15": "us-east-1"
26+
"16": "us-east-2"
27+
"17": "us-west-1"
28+
"18": "us-west-2"
2729

2830
# These variable files are included so the ec2-security-group role
2931
# knows which ports to open
@@ -39,28 +41,31 @@
3941
- roles/wireguard/defaults/main.yml
4042

4143
vars_prompt:
44+
# The region prompt is generated from ./util/print-aws-regions.py
45+
# Don't forget to update the default if it changes.
4246
- name: "aws_region_var"
4347
prompt: |
4448
In what region should the server be located?
45-
1. US East (N. Virginia)
46-
2. US East (Ohio)
47-
3. US West (N. California)
48-
4. US West (Oregon)
49-
5. Canada (Central)
50-
6. EU (Frankfurt)
51-
7. EU (Ireland)
52-
8. EU (London)
53-
9. EU (Paris)
54-
10. Asia Pacific (Tokyo)
55-
11. Asia Pacific (Seoul)
56-
12. Asia Pacific (Osaka-Local)
57-
13. Asia Pacific (Singapore)
58-
14. Asia Pacific (Sydney)
59-
15. Asia Pacific (Mumbai)
60-
16. South America (São Paulo)
61-
17. EU (Stockholm)
62-
Please choose the number of your region. Press enter for default (#13) region.
63-
default: "13"
49+
1. ap-east-1 Asia Pacific (Hong Kong)
50+
2. ap-northeast-1 Asia Pacific (Tokyo)
51+
3. ap-northeast-2 Asia Pacific (Seoul)
52+
4. ap-northeast-3 Asia Pacific (Osaka-Local)
53+
5. ap-south-1 Asia Pacific (Mumbai)
54+
6. ap-southeast-1 Asia Pacific (Singapore)
55+
7. ap-southeast-2 Asia Pacific (Sydney)
56+
8. ca-central-1 Canada (Central)
57+
9. eu-central-1 EU (Frankfurt)
58+
10. eu-north-1 EU (Stockholm)
59+
11. eu-west-1 EU (Ireland)
60+
12. eu-west-2 EU (London)
61+
13. eu-west-3 EU (Paris)
62+
14. sa-east-1 South America (São Paulo)
63+
15. us-east-1 US East (N. Virginia)
64+
16. us-east-2 US East (Ohio)
65+
17. us-west-1 US West (N. California)
66+
18. us-west-2 US West (Oregon)
67+
Please choose the number of your region. Press enter for default (#16) region.
68+
default: "16"
6469
private: no
6570

6671
- name: "aws_vpc_id_var"

playbooks/customize.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
prompt: "Enable Shadowsocks? Press enter for default "
2929
default: "yes"
3030
private: no
31+
- name: streisand_shadowsocks_v2ray_enabled
32+
prompt: "Enable v2ray-plugin for Shadowsocks? Press enter for default "
33+
default: "no"
34+
private: no
3135
- name: streisand_ssh_forward_enabled
3236
prompt: "Enable SSH Forward User? (Note: A SOCKS proxy only user will be added, no shell). Press enter for default "
3337
default: "yes"
@@ -48,6 +52,10 @@
4852
prompt: "Enable WireGuard? Press enter for default "
4953
default: "yes"
5054
private: no
55+
- name: streisand_cloudflared_enabled
56+
prompt: "Enable DNS-over-HTTPS (cloudflared)? Press enter for default "
57+
default: "yes"
58+
private: no
5159

5260
tasks:
5361
- lineinfile:
@@ -70,6 +78,10 @@
7078
path: "{{ streisand_site_vars }}"
7179
regexp: "^streisand_shadowsocks_enabled: (?:yes|no)$"
7280
line: "streisand_shadowsocks_enabled: {{ streisand_shadowsocks_enabled }}"
81+
- lineinfile:
82+
path: "{{ streisand_site_vars }}"
83+
regexp: "^streisand_shadowsocks_v2ray_enabled: (?:yes|no)$"
84+
line: "streisand_shadowsocks_v2ray_enabled: {{ streisand_shadowsocks_v2ray_enabled }}"
7385
- lineinfile:
7486
path: "{{ streisand_site_vars }}"
7587
regexp: "^streisand_ssh_forward_enabled: (?:yes|no)$"
@@ -94,3 +106,7 @@
94106
path: "{{ streisand_site_vars }}"
95107
regexp: "^streisand_wireguard_enabled: (?:yes|no)$"
96108
line: "streisand_wireguard_enabled: {{ streisand_wireguard_enabled }}"
109+
- lineinfile:
110+
path: "{{ streisand_site_vars }}"
111+
regexp: "^streisand_cloudflared_enabled: (?:yes|no)$"
112+
line: "streisand_cloudflared_enabled: {{ streisand_cloudflared_enabled }}"

0 commit comments

Comments
 (0)