Skip to content

Instantly share code, notes, and snippets.

@ilmich
ilmich / gist:58866d0c28af11539ae4eb4a6fd0e142
Created February 8, 2024 21:06
simple-reverse-proxy-python
#!/usr/bin/env python3
from http.server import BaseHTTPRequestHandler,HTTPServer
import argparse, os, random, sys, requests
import http.server
from socketserver import ThreadingMixIn
import threading
hostname = ''
def merge_two_dicts(x, y):
#!/bin/sh
# Slackware build script for v
# Copyright 2020 ilmich<ardutu@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
@ilmich
ilmich / tcptunnel.java
Created May 9, 2017 17:22
Java NIO tcp tunnel
package ctptunnel;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.ServerSocketChannel;
import java.nio.channels.SocketChannel;
import java.util.HashMap;