|
1 | | -## Version 2023/09/05 |
| 1 | +## Version 2023/10/10 |
2 | 2 | # make sure that your qbittorrent container is named qbittorrent |
3 | 3 | # make sure that your dns has a cname set for qbittorrent |
| 4 | +# Api and related location bypasses are now commented out by default |
| 5 | +# due to users easily misconfiguring qbittorrent to allow |
| 6 | +# public access through the api endpoint by including SWAG in |
| 7 | +# "Bypass authentication for clients in whitelisted IP subnets", |
| 8 | +# which results in all connections through SWAG to be considered |
| 9 | +# local and bypassing auth, which also applies to qbittorrent's |
| 10 | +# api endpoint (webui api) |
| 11 | +# enable at your own risk |
4 | 12 |
|
5 | 13 | server { |
6 | 14 | listen 443 ssl http2; |
@@ -47,108 +55,108 @@ server { |
47 | 55 | proxy_set_header X-Forwarded-Host $host; |
48 | 56 | } |
49 | 57 |
|
50 | | - location ~ (/qbittorrent)?/api { |
51 | | - include /config/nginx/proxy.conf; |
52 | | - include /config/nginx/resolver.conf; |
53 | | - set $upstream_app qbittorrent; |
54 | | - set $upstream_port 8080; |
55 | | - set $upstream_proto http; |
56 | | - proxy_pass $upstream_proto://$upstream_app:$upstream_port; |
57 | | - |
58 | | - rewrite /qbittorrent(.*) $1 break; |
59 | | - |
60 | | - proxy_set_header Referer ''; |
61 | | - proxy_set_header Host $upstream_app:$upstream_port; |
62 | | - proxy_set_header X-Forwarded-Host $host; |
63 | | - } |
64 | | - |
65 | | - location ~ (/qbittorrent)?/command { |
66 | | - include /config/nginx/proxy.conf; |
67 | | - include /config/nginx/resolver.conf; |
68 | | - set $upstream_app qbittorrent; |
69 | | - set $upstream_port 8080; |
70 | | - set $upstream_proto http; |
71 | | - proxy_pass $upstream_proto://$upstream_app:$upstream_port; |
72 | | - |
73 | | - rewrite /qbittorrent(.*) $1 break; |
74 | | - |
75 | | - proxy_set_header Referer ''; |
76 | | - proxy_set_header Host $upstream_app:$upstream_port; |
77 | | - proxy_set_header X-Forwarded-Host $host; |
78 | | - } |
79 | | - |
80 | | - location ~ (/qbittorrent)?/css { |
81 | | - include /config/nginx/proxy.conf; |
82 | | - include /config/nginx/resolver.conf; |
83 | | - set $upstream_app qbittorrent; |
84 | | - set $upstream_port 8080; |
85 | | - set $upstream_proto http; |
86 | | - proxy_pass $upstream_proto://$upstream_app:$upstream_port; |
87 | | - |
88 | | - rewrite /qbittorrent(.*) $1 break; |
89 | | - |
90 | | - proxy_set_header Referer ''; |
91 | | - proxy_set_header Host $upstream_app:$upstream_port; |
92 | | - proxy_set_header X-Forwarded-Host $host; |
93 | | - } |
94 | | - |
95 | | - location ~ (/qbittorrent)?/query { |
96 | | - include /config/nginx/proxy.conf; |
97 | | - include /config/nginx/resolver.conf; |
98 | | - set $upstream_app qbittorrent; |
99 | | - set $upstream_port 8080; |
100 | | - set $upstream_proto http; |
101 | | - proxy_pass $upstream_proto://$upstream_app:$upstream_port; |
102 | | - |
103 | | - rewrite /qbittorrent(.*) $1 break; |
104 | | - |
105 | | - proxy_set_header Referer ''; |
106 | | - proxy_set_header Host $upstream_app:$upstream_port; |
107 | | - proxy_set_header X-Forwarded-Host $host; |
108 | | - } |
109 | | - |
110 | | - location ~ (/qbittorrent)?/login { |
111 | | - include /config/nginx/proxy.conf; |
112 | | - include /config/nginx/resolver.conf; |
113 | | - set $upstream_app qbittorrent; |
114 | | - set $upstream_port 8080; |
115 | | - set $upstream_proto http; |
116 | | - proxy_pass $upstream_proto://$upstream_app:$upstream_port; |
117 | | - |
118 | | - rewrite /qbittorrent(.*) $1 break; |
119 | | - |
120 | | - proxy_set_header Referer ''; |
121 | | - proxy_set_header Host $upstream_app:$upstream_port; |
122 | | - proxy_set_header X-Forwarded-Host $host; |
123 | | - } |
124 | | - |
125 | | - location ~ (/qbittorrent)?/sync { |
126 | | - include /config/nginx/proxy.conf; |
127 | | - include /config/nginx/resolver.conf; |
128 | | - set $upstream_app qbittorrent; |
129 | | - set $upstream_port 8080; |
130 | | - set $upstream_proto http; |
131 | | - proxy_pass $upstream_proto://$upstream_app:$upstream_port; |
132 | | - |
133 | | - rewrite /qbittorrent(.*) $1 break; |
134 | | - |
135 | | - proxy_set_header Referer ''; |
136 | | - proxy_set_header Host $upstream_app:$upstream_port; |
137 | | - proxy_set_header X-Forwarded-Host $host; |
138 | | - } |
139 | | - |
140 | | - location ~ (/qbittorrent)?/scripts { |
141 | | - include /config/nginx/proxy.conf; |
142 | | - include /config/nginx/resolver.conf; |
143 | | - set $upstream_app qbittorrent; |
144 | | - set $upstream_port 8080; |
145 | | - set $upstream_proto http; |
146 | | - proxy_pass $upstream_proto://$upstream_app:$upstream_port; |
147 | | - |
148 | | - rewrite /qbittorrent(.*) $1 break; |
149 | | - |
150 | | - proxy_set_header Referer ''; |
151 | | - proxy_set_header Host $upstream_app:$upstream_port; |
152 | | - proxy_set_header X-Forwarded-Host $host; |
153 | | - } |
| 58 | + # location ~ (/qbittorrent)?/api { |
| 59 | + # include /config/nginx/proxy.conf; |
| 60 | + # include /config/nginx/resolver.conf; |
| 61 | + # set $upstream_app qbittorrent; |
| 62 | + # set $upstream_port 8080; |
| 63 | + # set $upstream_proto http; |
| 64 | + # proxy_pass $upstream_proto://$upstream_app:$upstream_port; |
| 65 | + |
| 66 | + # rewrite /qbittorrent(.*) $1 break; |
| 67 | + |
| 68 | + # proxy_set_header Referer ''; |
| 69 | + # proxy_set_header Host $upstream_app:$upstream_port; |
| 70 | + # proxy_set_header X-Forwarded-Host $host; |
| 71 | + # } |
| 72 | + |
| 73 | + # location ~ (/qbittorrent)?/command { |
| 74 | + # include /config/nginx/proxy.conf; |
| 75 | + # include /config/nginx/resolver.conf; |
| 76 | + # set $upstream_app qbittorrent; |
| 77 | + # set $upstream_port 8080; |
| 78 | + # set $upstream_proto http; |
| 79 | + # proxy_pass $upstream_proto://$upstream_app:$upstream_port; |
| 80 | + |
| 81 | + # rewrite /qbittorrent(.*) $1 break; |
| 82 | + |
| 83 | + # proxy_set_header Referer ''; |
| 84 | + # proxy_set_header Host $upstream_app:$upstream_port; |
| 85 | + # proxy_set_header X-Forwarded-Host $host; |
| 86 | + # } |
| 87 | + |
| 88 | + # location ~ (/qbittorrent)?/css { |
| 89 | + # include /config/nginx/proxy.conf; |
| 90 | + # include /config/nginx/resolver.conf; |
| 91 | + # set $upstream_app qbittorrent; |
| 92 | + # set $upstream_port 8080; |
| 93 | + # set $upstream_proto http; |
| 94 | + # proxy_pass $upstream_proto://$upstream_app:$upstream_port; |
| 95 | + |
| 96 | + # rewrite /qbittorrent(.*) $1 break; |
| 97 | + |
| 98 | + # proxy_set_header Referer ''; |
| 99 | + # proxy_set_header Host $upstream_app:$upstream_port; |
| 100 | + # proxy_set_header X-Forwarded-Host $host; |
| 101 | + # } |
| 102 | + |
| 103 | + # location ~ (/qbittorrent)?/query { |
| 104 | + # include /config/nginx/proxy.conf; |
| 105 | + # include /config/nginx/resolver.conf; |
| 106 | + # set $upstream_app qbittorrent; |
| 107 | + # set $upstream_port 8080; |
| 108 | + # set $upstream_proto http; |
| 109 | + # proxy_pass $upstream_proto://$upstream_app:$upstream_port; |
| 110 | + |
| 111 | + # rewrite /qbittorrent(.*) $1 break; |
| 112 | + |
| 113 | + # proxy_set_header Referer ''; |
| 114 | + # proxy_set_header Host $upstream_app:$upstream_port; |
| 115 | + # proxy_set_header X-Forwarded-Host $host; |
| 116 | + # } |
| 117 | + |
| 118 | + # location ~ (/qbittorrent)?/login { |
| 119 | + # include /config/nginx/proxy.conf; |
| 120 | + # include /config/nginx/resolver.conf; |
| 121 | + # set $upstream_app qbittorrent; |
| 122 | + # set $upstream_port 8080; |
| 123 | + # set $upstream_proto http; |
| 124 | + # proxy_pass $upstream_proto://$upstream_app:$upstream_port; |
| 125 | + |
| 126 | + # rewrite /qbittorrent(.*) $1 break; |
| 127 | + |
| 128 | + # proxy_set_header Referer ''; |
| 129 | + # proxy_set_header Host $upstream_app:$upstream_port; |
| 130 | + # proxy_set_header X-Forwarded-Host $host; |
| 131 | + # } |
| 132 | + |
| 133 | + # location ~ (/qbittorrent)?/sync { |
| 134 | + # include /config/nginx/proxy.conf; |
| 135 | + # include /config/nginx/resolver.conf; |
| 136 | + # set $upstream_app qbittorrent; |
| 137 | + # set $upstream_port 8080; |
| 138 | + # set $upstream_proto http; |
| 139 | + # proxy_pass $upstream_proto://$upstream_app:$upstream_port; |
| 140 | + |
| 141 | + # rewrite /qbittorrent(.*) $1 break; |
| 142 | + |
| 143 | + # proxy_set_header Referer ''; |
| 144 | + # proxy_set_header Host $upstream_app:$upstream_port; |
| 145 | + # proxy_set_header X-Forwarded-Host $host; |
| 146 | + # } |
| 147 | + |
| 148 | + # location ~ (/qbittorrent)?/scripts { |
| 149 | + # include /config/nginx/proxy.conf; |
| 150 | + # include /config/nginx/resolver.conf; |
| 151 | + # set $upstream_app qbittorrent; |
| 152 | + # set $upstream_port 8080; |
| 153 | + # set $upstream_proto http; |
| 154 | + # proxy_pass $upstream_proto://$upstream_app:$upstream_port; |
| 155 | + |
| 156 | + # rewrite /qbittorrent(.*) $1 break; |
| 157 | + |
| 158 | + # proxy_set_header Referer ''; |
| 159 | + # proxy_set_header Host $upstream_app:$upstream_port; |
| 160 | + # proxy_set_header X-Forwarded-Host $host; |
| 161 | + # } |
154 | 162 | } |
0 commit comments