# ~/.pip/pip.conf
[global]
index-url = https://pypi.douban.com/simpleI get a job to hide openstack behind a reverse proxy and make default ports completely invisible from users.
Right now I am afraid openstack has some problem with a unified api gateway, so I have to modify response body if version controller is accessed by the end user. (Sadly version controller should not be used because from my point of view, it conflicts with endpoints returned)
# nginx config# generate ca key & certificate
openssl genrsa -out ca.key 2048
openssl req -x509 -new -nodes -key ca.key -sha256 -days 10000 -out ca.crt
# generate client key & csr
openssl genrsa -out client.key 2048
openssl req -new -key client.key -out client.csr
# sign request and get client certificateRecently I get confused on how to sniff HTTPS traffic, I think I need a proxy and it turns out correct. I setup a proxy chain by using stunnel.
I use two machines (which is not optimal), one is used for executing command and serving stunnel server; then other one is used for stunnel client and sniffing.
#!/bin/bash
set -e
source ${ENV_FILE}
# set image name
IMAGE_DEF=
# set url
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # get router gateway external gateway network id | |
| ROUTER_ID= | |
| openstack router show ${ROUTER_ID} -f value -c gateway_external_info | jq '.network_id' | sed 's/"//g' | |
| # router namespace is named in the form of qrouter-<ROUTER-ID> | |
| # snat namespace is named with snat-<ROUTER-ID> | |
| # fip namespace is named with fip-<EXTERNAL-NETWORK-ID> | |
| # dvr layout | |
| # edge node |