secubox-openwrt/package/secubox/mitmproxy/Makefile
CyberMind-FR 7f5cb14b96 feat: Rewrite mitmproxy with native OpenWrt build (v10.0.0)
Complete rewrite of secubox-app-mitmproxy to use native OpenWrt packages
instead of pip runtime installation.

New packages created:
- mitmproxy (10.0.0) - Native build from GitHub source
- python3-mitmproxy-rs (0.5.2) - Rust extension with PyO3
- python3-h11 (0.14.0) - HTTP/1.1 protocol
- python3-h2 (4.1.0) - HTTP/2 protocol
- python3-hyperframe (6.0.1) - HTTP/2 framing
- python3-hpack (4.0.0) - HPACK compression
- python3-wsproto (1.2.0) - WebSocket protocol
- python3-aioquic (1.0.0) - QUIC/HTTP3 support
- python3-pylsqpack (0.3.18) - QPACK encoder
- python3-kaitaistruct (0.10) - Binary parsing
- python3-publicsuffix2 (2.20191221) - Domain parsing
- python3-ldap3 (2.9.1) - LDAP support

Changes to secubox-app-mitmproxy:
- Removed pip dependency, now uses native +mitmproxy package
- Removed wrapper scripts (native binaries from mitmproxy package)
- Fixed iptables cleanup to use configured port
- Bumped version to 2.0.0

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 18:28:53 +01:00

91 lines
2.4 KiB
Makefile

#
# Copyright (C) 2025 CyberMind.fr (SecuBox)
#
# This is free software, licensed under the MIT License.
#
# mitmproxy - Native build for OpenWrt
# Provides mitmproxy, mitmdump, and mitmweb binaries
#
include $(TOPDIR)/rules.mk
PKG_NAME:=mitmproxy
PKG_VERSION:=10.0.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/mitmproxy/mitmproxy/archive/refs/tags/v$(PKG_VERSION).tar.gz?
PKG_HASH:=c1884a3b6c33dca05488e483f19dd13cefac6367e16bdf5961c8a9ff4105b9cc
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=CyberMind <contact@cybermind.fr>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk
define Package/mitmproxy
SECTION:=net
CATEGORY:=Network
SUBMENU:=SecuBox Apps
TITLE:=Interactive HTTPS Proxy
URL:=https://mitmproxy.org/
DEPENDS:= \
+python3 \
+python3-asyncio \
+python3-logging \
+python3-openssl \
+python3-urllib \
+python3-email \
+python3-codecs \
+python3-ctypes \
+python3-multiprocessing \
+python3-mitmproxy-rs \
+python3-cryptography \
+python3-pyopenssl \
+python3-tornado \
+python3-flask \
+python3-h11 \
+python3-h2 \
+python3-wsproto \
+python3-aioquic \
+python3-kaitaistruct \
+python3-publicsuffix2 \
+python3-ldap3 \
+python3-passlib \
+python3-msgpack \
+python3-sortedcontainers \
+python3-pyparsing \
+python3-ruamel-yaml \
+python3-certifi
endef
define Package/mitmproxy/description
mitmproxy is an interactive TLS-capable intercepting HTTP proxy
for penetration testers and software developers.
This package provides:
- mitmproxy: Interactive console interface
- mitmdump: Command-line dumping tool
- mitmweb: Web-based interface
Native build for OpenWrt with all dependencies.
endef
define Build/Compile
$(call Py3Build/Compile)
endef
define Py3Package/mitmproxy/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mitmproxy $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mitmdump $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mitmweb $(1)/usr/bin/
endef
$(eval $(call Py3Package,mitmproxy))
$(eval $(call BuildPackage,mitmproxy))
$(eval $(call BuildPackage,mitmproxy-src))