Skip to content

Commit 27200d8

Browse files
committed
fix: fix building enclave image
1 parent b6fd5c0 commit 27200d8

File tree

3 files changed

+16
-153
lines changed

3 files changed

+16
-153
lines changed

Cargo.lock

Lines changed: 5 additions & 149 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ strip = true
1515
opt-level = 's'
1616

1717
[workspace.package]
18-
version = "1.1.4"
18+
version = "1.1.5"
1919
edition = "2021"
2020
repository = "https://github.com/ldclabs/idempotent-proxy"
2121
keywords = ["idempotent", "reverse", "proxy", "icp"]
@@ -40,9 +40,8 @@ reqwest = { version = "0.12", features = [
4040
"json",
4141
"gzip",
4242
"stream",
43-
"trust-dns",
4443
"http2",
45-
"hickory-dns",
44+
# "hickory-dns",
4645
], default-features = true }
4746
dotenvy = "0.15"
4847
futures = "0.3"

enclave/setup.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,22 @@
44
ifconfig lo 127.0.0.1
55
ifconfig
66

7+
# Debian: failed to initialize nft: Protocol not supported
8+
update-alternatives --set iptables /usr/sbin/iptables-legacy
9+
# update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
10+
# update-alternatives --set arptables /usr/sbin/arptables-legacy
11+
# update-alternatives --set ebtables /usr/sbin/ebtables-legacy
12+
713
# adding a default route
814
ip route add default via 127.0.0.1 dev lo
915
route -n
1016

1117
# iptables rules to route traffic to transparent proxy
1218
iptables -A OUTPUT -t nat -p tcp --dport 1:65535 ! -d 127.0.0.1 -j DNAT --to-destination 127.0.0.1:1200
19+
# replace the source address with 127.0.0.1 for outgoing packets with a source of 0.0.0.0
20+
# ensures returning packets have 127.0.0.1 as the destination and not 0.0.0.0
1321
iptables -t nat -A POSTROUTING -o lo -s 0.0.0.0 -j SNAT --to-source 127.0.0.1
14-
iptables -L -t nat
22+
iptables -L -t nat -v -n
1523

1624
# generate identity key
1725
/app/keygen --secret /app/id.sec --public /app/id.pub

0 commit comments

Comments
 (0)