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
import json | |
import os | |
import base64 | |
import argparse | |
from graphql import parse | |
def parse_http_request(http_request): | |
"""Parse the HTTP request to extract the JSON body and Host header.""" | |
try: | |
headers_and_body = http_request.split('\r\n\r\n') |
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
#! /usr/bin/python3 | |
import http.server | |
import sys | |
import random | |
import string | |
import argparse | |
import socket | |
import logging | |
import signal |
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
{ | |
"proxy":{ | |
"ssl_pass_through":{ | |
"automatically_add_entries_on_client_ssl_negotiation_failure":false, | |
"rules":[ | |
{ | |
"enabled":true, | |
"host":".*\\.google\\.com", | |
"protocol":"any" | |
}, |