justmao945 / Mallory
Licence: mit
HTTP/HTTPS proxy over SSH
Stars: ✭ 251
Programming Languages
go
31211 projects - #10 most used programming language
Projects that are alternatives of or similar to Mallory
Fasttunnel
NAT 内网穿透 远程内网计算机 域名访问内网站点 反向代理内网服务 花生壳 端口转发 http代理 微信 小程序 expose a local server behind a NAT or firewall to the internet like ngrok and frp. NAT ssh proxy tunnel reverse-proxy
Stars: ✭ 248 (-1.2%)
Mutual labels: proxy, http-proxy, ssh
Smartproxy
HTTP(S) Rotating Residential proxies - Code examples & General information
Stars: ✭ 205 (-18.33%)
Mutual labels: proxy, http-proxy, proxy-server
Proxy requests
a class that uses scraped proxies to make http GET/POST requests (Python requests)
Stars: ✭ 357 (+42.23%)
Mutual labels: proxy, http-proxy, proxy-server
Free Proxy List
🔥Free proxy servers list / Updated hourly!
Stars: ✭ 326 (+29.88%)
Mutual labels: proxy, http-proxy, proxy-server
Httpproxy
Go HTTP proxy server library
Stars: ✭ 110 (-56.18%)
Mutual labels: proxy, http-proxy, proxy-server
Awslambdaproxy
An AWS Lambda powered HTTP/SOCKS web proxy
Stars: ✭ 571 (+127.49%)
Mutual labels: proxy, http-proxy, proxy-server
Psiphon
A multi-functional version of a popular network circumvention tool
Stars: ✭ 169 (-32.67%)
Mutual labels: proxy, proxy-server, ssh
Citadelcore
Cross platform filtering HTTP/S proxy based on .NET Standard 2.0.
Stars: ✭ 28 (-88.84%)
Mutual labels: proxy, http-proxy, proxy-server
Proxybroker
Proxy [Finder | Checker | Server]. HTTP(S) & SOCKS 🎭
Stars: ✭ 2,767 (+1002.39%)
Mutual labels: proxy, http-proxy, proxy-server
Noginx
High performance HTTP and reverse proxy server based on Node.js. 基于 Node.js 的高性能 HTTP 及反向代理服务器,类似nginx。
Stars: ✭ 53 (-78.88%)
Mutual labels: proxy, http-proxy, proxy-server
Mubeng
An incredibly fast proxy checker & IP rotator with ease.
Stars: ✭ 234 (-6.77%)
Mutual labels: proxy, http-proxy, proxy-server
Flynet
A powerful TCP/UDP tool, which support socks5 proxy by tcp and udp, http proxy and NAT traversal. This tool can help you bypass gfw easily
Stars: ✭ 124 (-50.6%)
Mutual labels: proxy, http-proxy, proxy-server
Beyond
BeyondCorp-inspired Access Proxy. Secure internal services outside your VPN/perimeter network during a zero-trust transition.
Stars: ✭ 151 (-39.84%)
Mutual labels: proxy, http-proxy, proxy-server
Goproxy
🦁 goproxy is a proxy server which can forward http or https requests to remote servers./ goproxy 是一个反向代理服务器,支持转发 http/https 请求。
Stars: ✭ 175 (-30.28%)
Mutual labels: proxy, proxy-server
Macos Openvpn Server
macOS OpenVPN Server and Client Configuration (OpenVPN, Tunnelblick, PF)
Stars: ✭ 172 (-31.47%)
Mutual labels: proxy, proxy-server
Otoroshi
Lightweight api management on top of a modern http reverse proxy
Stars: ✭ 177 (-29.48%)
Mutual labels: proxy, http-proxy
Proxyman
Modern and Delightful Web Debugging Proxy for macOS, iOS, and Android ⚡️
Stars: ✭ 2,571 (+924.3%)
Mutual labels: proxy, proxy-server
Inlets Pro
Secure TCP and HTTP tunnels that work anywhere
Stars: ✭ 179 (-28.69%)
Mutual labels: proxy, ssh
Easyssh Proxy
easyssh-proxy provides a simple implementation of some SSH protocol features in Go
Stars: ✭ 180 (-28.29%)
Mutual labels: proxy, ssh
mallory
HTTP/HTTPS proxy over SSH.
Installation
- Local machine:
go get github.com/justmao945/mallory/cmd/mallory
- Remote server: need our old friend sshd
Configuration
Config file
Default path is $HOME/.config/mallory.json
, can be set when start program
mallory -config path/to/config.json
Content:
-
id_rsa
is the path to our private key file, can be generated byssh-keygen
-
local_smart
is the local address to serve HTTP proxy with smart detection of destination host -
local_normal
is similar tolocal_smart
but send all traffic through remote SSH server without destination host detection -
remote
is the remote address of SSH server -
blocked
is a list of domains that need use proxy, any other domains will connect to their server directly
{
"id_rsa": "$HOME/.ssh/id_rsa",
"local_smart": ":1315",
"local_normal": ":1316",
"remote": "ssh://[email protected]:22",
"blocked": [
"angularjs.org",
"golang.org",
"google.com",
"google.co.jp",
"googleapis.com",
"googleusercontent.com",
"google-analytics.com",
"gstatic.com",
"twitter.com",
"youtube.com"
]
}
Blocked list in config file will be reloaded automatically when updated, and you can do it manually:
# send signal to reload
kill -USR2 <pid of mallory>
# or use reload command by sending http request
mallory -reload
System config
- Set both HTTP and HTTPS proxy to
localhost
with port1315
to use with block list - Set env var
http_proxy
andhttps_proxy
tolocalhost:1316
for terminal usage
Get the right suffix name for a domain
mallory -suffix www.google.com
A simple command to forward all traffic for the given port
# install it: go get github.com/justmao945/mallory/cmd/forward
# all traffic through port 20022 will be forwarded to destination.com:22
forward -network tcp -listen :20022 -forward destination.com:22
# you can ssh to destination:22 through localhost:20022
ssh [email protected] -p 20022
TODO
- return http error when unable to dial
- add host to list automatically when unable to dial
- support multiple remote servers
Docker container
Considering the following config file:
$ cat mallory.json
{
"id_rsa": "/tmp/id_rsa",
"local_smart": ":1315",
"local_normal": ":1316",
"remote": "ssh://[email protected]:22"
}
You can run the container (zoobab/mallory
) my mounting the config file, the SSH key, and mapping the 2 ports:
$ docker run -v $PWD/mallory.json:/root/.config/mallory.json -p 1316:1316 -p 1315:1315 -v $PWD/.ssh/id_rsa:/tmp/id_rsa zoobab/mallory
mallory: 2020/03/30 16:51:10 main.go:22: Starting...
mallory: 2020/03/30 16:51:10 main.go:23: PID: 1
mallory: 2020/03/30 16:51:10 config.go:103: Loading: /root/.config/mallory.json
mallory: 2020/03/30 16:51:10 main.go:30: Connecting remote SSH server: ssh://[email protected]:22
mallory: 2020/03/30 16:51:10 main.go:38: Local normal HTTP proxy: :1316
mallory: 2020/03/30 16:51:10 main.go:48: Local smart HTTP proxy: :1315
My use case was to connect to a Kubernetes cluster (Openshift) installed behind an SSH bastion:
$ export http_proxy=http://localhost:1316
$ export https_proxy=https://localhost:1316
$ oc login https://master.mycluster.zoobab.com:8443
Authentication required for https://master.mycluster.zoobab.com:8443 (openshift)
Username: bhenrion
Password:
Login successful.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].