Skip to content

Commit 48084f8

Browse files
committed
addpkg: fakehttp
1 parent 0823c55 commit 48084f8

File tree

6 files changed

+80
-0
lines changed

6 files changed

+80
-0
lines changed

archlinuxcn/fakehttp/PKGBUILD

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Maintainer: DeepChirp <[email protected]>
2+
# Contributor: bgme <[email protected]>
3+
4+
pkgname=fakehttp
5+
_reponame=FakeHTTP
6+
pkgver=0.9.18
7+
pkgrel=1
8+
pkgdesc="Obfuscate all your TCP connections into HTTP protocol."
9+
arch=('x86_64' 'armv7h' 'aarch64')
10+
_author=MikeWang000000
11+
url="https://github.com/${_author}/${_reponame}"
12+
license=('GPL-3.0-only')
13+
depends=('glibc' 'libmnl' 'libnfnetlink' 'libnetfilter_queue' 'nftables')
14+
makedepends=('make')
15+
conflicts=("${pkgname%}-git" "${pkgname%}-bin")
16+
install=${pkgname}.install
17+
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz"
18+
"${pkgname}.service"
19+
"${pkgname}.sysusers"
20+
"${pkgname}.conf")
21+
backup=("etc/conf.d/${pkgname}")
22+
sha256sums=('c95c4d46e122390b0dcfd8509c708a6fc6817fb3e325cb966bf81a62bae973be'
23+
'cedc4c4a0018a95d071c0e16a0ba3987f7da3a5f9589e501b9b43f7572196cdd'
24+
'ae55fc0399df3ed3b9585dcf3d3a43322ee555954f8f4a24796bc532e7f735b3'
25+
'a316231897b13ca8a98cd7e63e83716336ec92570275fb08ddc6e53703558166')
26+
27+
build() {
28+
cd "${srcdir}/${_reponame}-${pkgver}"
29+
make
30+
}
31+
32+
package() {
33+
install -dm755 "${pkgdir}/usr/bin"
34+
install -dm755 "${pkgdir}/usr/lib/systemd/system"
35+
install -dm755 "${pkgdir}/etc/conf.d"
36+
37+
install -Dm644 "${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/"
38+
install -Dm644 "${pkgname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
39+
install -Dm644 "${pkgname}.conf" "${pkgdir}/etc/conf.d/${pkgname}"
40+
41+
cd "${srcdir}/${_reponame}-${pkgver}"
42+
43+
install -Dm755 build/fakehttp "${pkgdir}/usr/bin/${pkgname}"
44+
install -dm755 "${pkgdir}/usr/share/doc/${pkgname}"
45+
install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
46+
}

archlinuxcn/fakehttp/fakehttp.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# fakehttp command line args
2+
# Adjust according to your environment.
3+
# Do NOT include the "-d" option when running under systemd.
4+
FAKEHTTP_ARGS="-h example.com -a"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
post_install() {
2+
echo 'Edit /etc/conf.d/fakehttp before enabling and starting the fakehttp.service'
3+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[Unit]
2+
Description=FakeHTTP TCP obfuscation daemon
3+
After=network.target
4+
5+
[Service]
6+
EnvironmentFile=-/etc/conf.d/fakehttp
7+
ExecStart=/usr/bin/fakehttp $FAKEHTTP_ARGS
8+
User=fakehttp
9+
AmbientCapabilities=CAP_NET_RAW CAP_NET_ADMIN CAP_SYS_NICE
10+
CapabilityBoundingSet=CAP_NET_RAW CAP_NET_ADMIN CAP_SYS_NICE
11+
NoNewPrivileges=yes
12+
Restart=on-abort
13+
14+
[Install]
15+
WantedBy=multi-user.target
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
u fakehttp - "FakeHTTP Service" - -

archlinuxcn/fakehttp/lilac.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
maintainers:
2+
- github: DeepChirp
3+
4+
5+
pre_build_script: update_pkgver_and_pkgrel(_G.newver)
6+
post_build_script: git_pkgbuild_commit()
7+
8+
update_on:
9+
- source: github
10+
github: MikeWang000000/FakeHTTP
11+
use_latest_release: true

0 commit comments

Comments
 (0)