---
# System prepended metadata

title: squid(reverse proxy) enable https

---

# squid(reverse proxy) enable HTTPS
https://medium.com/%E8%BC%95%E9%AC%86%E5%B0%8F%E5%93%81-pks%E8%88%87k8s%E7%9A%84%E9%BB%9E%E6%BB%B4/behind-proxy%E7%9A%84k8s%E5%8F%A2%E9%9B%86-%E6%B7%B7%E5%90%88%E9%9B%B2%E6%9E%B6%E6%A7%8B%E8%A8%AD%E8%A8%88-squid-proxy-%E6%9E%B6%E6%A7%8B1-95ce23649054

## Python改進
```python
proxies = {"https": "%s:%s@%s" % (Config.PROXY_HOST, "account", "password")}
```
to
```python
proxies = {"https": f"http://{Config.PROXY_USER}:{Config.PROXY_PASS}@{Config.PROXY_HOST}"}
```
