Skip to content

Commit 1bb973e

Browse files
serinkobenedettadavicojstuczyn
authored
Feature: Nym node html landing page (#6053)
* add proper landing page and hook it to node autorun * Update nym-node version --------- Co-authored-by: benedetta davico <46782255+benedettadavico@users.noreply.github.com> Co-authored-by: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
1 parent aa1cad4 commit 1bb973e

File tree

3 files changed

+284
-25
lines changed

3 files changed

+284
-25
lines changed

nym-node/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
[package]
55
name = "nym-node"
6-
version = "1.18.0"
6+
version = "1.16.0"
77
authors.workspace = true
88
repository.workspace = true
99
homepage.workspace = true
Lines changed: 232 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,238 @@
11
<!DOCTYPE html>
2-
<html lang="en">
2+
<html lang="en-US">
33
<head>
4-
<meta charset="UTF-8">
5-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6-
<title>Nym Node</title>
7-
<style>
8-
body {
9-
font-family: sans-serif;
10-
text-align: center;
11-
padding: 2em;
12-
background-color: #111;
13-
color: #0ff;
14-
}
15-
h1 {
16-
margin-bottom: 0.5em;
17-
}
18-
</style>
4+
<meta charset="UTF-8">
5+
<title>This is a NYM Exit Gateway</title>
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<link rel="icon" type="image/png" href="">
8+
<meta name="contact:email" content="<YOUR_EMAIL_ADDRESS>">
9+
10+
<script>
11+
(function () {
12+
function applyMailto() {
13+
const meta = document.querySelector('meta[name="contact:email"]');
14+
const EMAIL = (meta && meta.content || "").trim();
15+
if (!EMAIL) return;
16+
document.querySelectorAll('a[data-mailto]').forEach(a => {
17+
a.href = `mailto:${EMAIL}`;
18+
if (!a.textContent.trim()) a.textContent = EMAIL;
19+
});
20+
}
21+
if (document.readyState === 'loading') {
22+
document.addEventListener('DOMContentLoaded', applyMailto);
23+
} else {
24+
applyMailto();
25+
}
26+
})();
27+
</script>
28+
29+
<style>
30+
:root {
31+
/* font + theme tokens */
32+
font-family: Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace;
33+
--background-color: #242B2D;
34+
--text-color: #FFFFFF;
35+
--link-color: #07ff94;
36+
--title-color: #07ff94;
37+
}
38+
39+
html {
40+
background: var(--background-color);
41+
}
42+
43+
body {
44+
margin-left: auto;
45+
margin-right: auto;
46+
padding-left: 5vw;
47+
padding-right: 5vw;
48+
max-width: 1000px;
49+
color: var(--text-color); /* default text color */
50+
}
51+
52+
h1 {
53+
font-size: 55px;
54+
text-align: center;
55+
color: var(--title-color);
56+
}
57+
58+
p {
59+
color: var(--text-color);
60+
}
61+
62+
p, a {
63+
font-size: 20px;
64+
}
65+
66+
a {
67+
color: var(--link-color);
68+
text-decoration: none;
69+
}
70+
71+
a:hover {
72+
filter: brightness(.8);
73+
text-decoration: underline;
74+
}
75+
76+
.links {
77+
display: flex;
78+
flex-wrap: wrap;
79+
justify-content: space-evenly;
80+
}
81+
82+
.links > a {
83+
margin: 10px;
84+
white-space: nowrap;
85+
}
86+
</style>
1987
</head>
88+
2089
<body>
21-
<h1>Nym Node</h1>
22-
<p>This is a devrel testing placeholder page for Nym Node landing page.</p>
90+
<main>
91+
<h1>This is a NYM Exit Gateway</h1>
92+
93+
94+
<p>
95+
You are most likely accessing this website because you've had some issue with
96+
the traffic coming from this IP. This router is part of the <a
97+
href="https://nym.com/">NYM project</a>, which is
98+
dedicated to <a href="https://nym.com/about/mission">create</a> outstanding
99+
privacy software that is legally compliant without sacrificing integrity or
100+
having any backdoors.
101+
This router IP should be generating no other traffic, unless it has been
102+
compromised.
103+
</p>
104+
105+
<p><strong>
106+
If you are a representative of a company who feels that this router is being
107+
used to violate the DMCA, please be aware that this machine does not host or
108+
contain any illegal content. Also be aware that network infrastructure
109+
maintainers are not liable for the type of content that passes over their
110+
equipment, in accordance with <a
111+
href="https://www.law.cornell.edu/uscode/text/17/512">DMCA
112+
"safe harbor" provisions</a>. In other words, you will have just as much luck
113+
sending a takedown notice to the Internet backbone providers.
114+
</strong></p>
115+
116+
<p>
117+
Nym Network is operated by a decentralised community of node operators
118+
and stakers. Nym Network is trustless, meaning that no parts of the system
119+
nor its operators have access to information that might compromise the privacy
120+
of users. Nym software enacts a strict principle of data minimisation and has
121+
no back doors. The Nym mixnet works by encrypting packets in several layers
122+
and relaying those through a multi-layered network called a mixnet, eventually
123+
letting the traffic exit the Nym mixnet through an exit gateway like this one.
124+
This design makes it impossible for a service to know which user is connecting to it,
125+
since it can only see the IP-address of the Nym exit gateway:
126+
</p>
127+
128+
<p style="text-align:center;margin:40px 0">
129+
<svg xmlns="http://www.w3.org/2000/svg" width="500" viewBox="0 0 490.28 293.73" style="width:100%;max-width:600px" role="img" aria-label="Diagram of how a user connects through the Nym network">
130+
<desc>Illustration showing how a user might connect to a service through the Nym Network. The user first sends their data through three daisy-chained encrypted Nym nodes that exist on three different continents. Then the last Nym node in the chain connects to the target service over the normal internet.</desc>
131+
<defs>
132+
<style>
133+
.t {
134+
fill: var(--text-color);
135+
stroke: var(--text-color);
136+
}
137+
</style>
138+
</defs>
139+
<!-- (SVG content left unchanged) -->
140+
<path fill="#6fc8b7" d="M257.89 69.4c-6.61-6.36-10.62-7.73-18.36-8.62-7.97-1.83-20.06-7.99-24.17-.67-3.29 5.85-18.2 12.3-16.87 2.08.92-7.03 11.06-13.28 17-17.37 8.69-5.99 24.97-2.87 26.1-10.28 1.04-6.86-8.33-13.22-8.55-2.3-.38 12.84-19.62 2.24-8.73-6.2 8.92-6.9 16.05-9.02 25.61-6.15 12.37 4.83 25.58-2.05 33.73-.71 12.37-2.01 24.69-5.25 37.39-3.96 13 .43 24.08-.14 37.06.63 9.8 1.58 16.5 2.87 26.37 3.6 6.6.48 17.68-.82 24.3 1.9 8.3 4.24.44 10.94-6.89 11.8-8.79 1.05-23.59-1.19-26.6 1.86-5.8 7.41 10.75 5.68 11.27 14.54.57 9.45-5.42 9.38-8.72 16-2.7 4.2.3 13.93-1.18 18.45-1.85 5.64-19.64 4.47-14.7 14.4 4.16 8.34 1.17 19.14-10.33 12.02-5.88-3.65-9.85-22.04-15.66-21.9-11.06.27-11.37 13.18-12.7 17.52-1.3 4.27-3.79 2.33-6-.63-3.54-4.76-7.75-14.22-12.01-17.32-6.12-4.46-10.75-1.17-15.55 2.83-5.63 4.69-8.78 7.82-7.46 16.5.78 9.1-12.9 15.84-14.98 24.09-2.61 10.32-2.57 22.12-8.81 31.47-4 5.98-14.03 20.12-21.27 14.97-7.5-5.34-7.22-14.6-9.56-23.08-2.5-9.02.6-17.35-2.57-26.2-2.45-6.82-6.23-14.54-13.01-13.24-6.5.92-15.08 1.38-19.23-2.97-5.65-5.93-6-10.1-6.61-18.56 1.65-6.94 5.79-12.64 10.38-18.63 3.4-4.42 17.45-10.39 25.26-7.83 10.35 3.38 17.43 10.5 28.95 8.57 3.12-.53 9.14-4.65 7.1-6.62zm-145.6 37.27c-4.96-1.27-11.57 1.13-11.8 6.94-1.48 5.59-4.82 10.62-5.8 16.32.56 6.42 4.34 12.02 8.18 16.97 3.72 3.85 8.58 7.37 9.3 13.1 1.24 5.88 1.6 11.92 2.28 17.87.34 9.37.95 19.67 7.29 27.16 4.26 3.83 8.4-2.15 6.52-6.3-.54-4.54-.6-9.11 1.01-13.27 4.2-6.7 7.32-10.57 12.44-16.64 5.6-7.16 12.74-11.75 14-20.9.56-4.26 5.72-13.86 1.7-16.72-3.14-2.3-15.83-4-18.86-6.49-2.36-1.71-3.86-9.2-9.86-12.07-4.91-3.1-10.28-6.73-16.4-5.97zm11.16-49.42c6.13-2.93 10.58-4.77 14.61-10.25 3.5-4.28 2.46-12.62-2.59-15.45-7.27-3.22-13.08 5.78-18.81 8.71-5.96 4.2-12.07-5.48-6.44-10.6 5.53-4.13.38-9.2-5.66-8.48-6.12.8-12.48-1.45-18.6-1.73-5.3-.7-10.13-1-15.45-1.37-5.37-.05-16.51-2.23-25.13.87-5.42 1.79-12.5 5.3-16.73 9.06-4.85 4.2.2 7.56 5.54 7.45 5.3-.22 16.8-5.36 20.16.98 3.68 8.13-5.82 18.29-5.2 26.69.1 6.2 3.37 11 4.74 16.98 1.62 5.94 6.17 10.45 10 15.14 4.7 5.06 13.06 6.3 19.53 8.23 7.46.14 3.34-9.23 3.01-14.11 1.77-7.15 8.49-7.82 12.68-13.5 7.14-7.72 16.41-13.4 24.34-18.62zM190.88 3.1c-4.69 0-13.33.04-18.17-.34-7.65.12-13.1-.62-19.48-1.09-3.67.39-9.09 3.34-5.28 7.04 3.8.94 7.32 4.92 7.1 9.31 1.32 4.68 1.2 11.96 6.53 13.88 4.76-.2 7.12-7.6 11.93-8.25 6.85-2.05 12.5-4.58 17.87-9.09 2.48-2.76 7.94-6.38 5.26-10.33-1.55-1.31-2.18-.64-5.76-1.13zm178.81 157.37c-2.66 10.08-5.88 24.97 9.4 15.43 7.97-5.72 12.58-2.02 17.47 1.15.5.43 2.65 9.2 7.19 8.53 5.43-2.1 11.55-5.1 14.96-11.2 2.6-4.62 3.6-12.39 2.76-13.22-3.18-3.43-6.24-11.03-7.7-15.1-.76-2.14-2.24-2.6-2.74-.4-2.82 12.85-6.04 1.22-10.12-.05-8.2-1.67-29.62 7.17-31.22 14.86z"/>
141+
<g fill="none">
142+
<path stroke="#cf63a6" stroke-linecap="round" stroke-width="2.76" d="M135.2 140.58c61.4-3.82 115.95-118.83 151.45-103.33"/>
143+
<path stroke="#cf63a6" stroke-linecap="round" stroke-width="2.76" d="M74.43 46.66c38.15 8.21 64.05 42.26 60.78 93.92M286.65 37.25c-9.6 39.44-3.57 57.12-35.64 91.98"/>
144+
<path stroke="#e4c101" stroke-dasharray="9.06,2.265" stroke-width="2.27" d="M397.92 162.52c-31.38 1.26-90.89-53.54-148.3-36.17"/>
145+
<path stroke="#cf63a6" stroke-linecap="round" stroke-width="2.77" d="M17.6 245.88c14.35 0 14.4.05 28-.03"/>
146+
<path stroke="#e3bf01" stroke-dasharray="9.06,2.265" stroke-width="2.27" d="M46.26 274.14c-17.52-.12-16.68.08-30.34.07"/>
147+
</g>
148+
<g transform="translate(120.8 -35.81)">
149+
<circle cx="509.78" cy="68.74" r="18.12" fill="#240a3b" transform="translate(-93.3 38.03) scale(.50637)"/>
150+
<circle cx="440.95" cy="251.87" r="18.12" fill="#240a3b" transform="translate(-93.3 38.03) scale(.50637)"/>
151+
<circle cx="212.62" cy="272.19" r="18.12" fill="#240a3b" transform="translate(-93.3 38.03) scale(.50637)"/>
152+
<circle cx="92.12" cy="87.56" r="18.12" fill="#240a3b" transform="translate(-93.3 38.03) scale(.50637)"/>
153+
<circle cx="730.88" cy="315.83" r="18.12" fill="#67727b" transform="translate(-93.3 38.03) scale(.50637)"/>
154+
<circle cx="-102.85" cy="282.18" r="9.18" fill="#240a3b"/>
155+
<circle cx="-102.85" cy="309.94" r="9.18" fill="#67727b"/>
156+
</g>
157+
<g class="t">
158+
<text xml:space="preserve" x="-24.76" y="10.37" stroke-width=".26" font-size="16.93" font-weight="700" style="line-height:1.25" transform="translate(27.79 2.5)" word-spacing="0"><tspan x="-24.76" y="10.37">The user</tspan></text>
159+
<text xml:space="preserve" x="150.63" y="196.62" stroke-width=".26" font-size="16.93" font-weight="700" style="line-height:1.25" transform="translate(27.79 2.5)" word-spacing="0"><tspan x="150.63" y="196.62">This server</tspan></text>
160+
<text xml:space="preserve" x="346.39" y="202.63" stroke-width=".26" font-size="16.93" font-weight="700" style="line-height:1.25" transform="translate(27.79 2.5)" word-spacing="0"><tspan x="346.39" y="202.63">Your service</tspan></text>
161+
<text xml:space="preserve" x="34.52" y="249.07" stroke-width=".26" font-size="16.93" font-weight="700" style="line-height:1.25" transform="translate(27.79 2.5)" word-spacing="0"><tspan x="34.52" y="249.07">Nym network link</tspan></text>
162+
<text xml:space="preserve" x="34.13" y="276.05" stroke-width=".26" font-size="16.93" font-weight="700" style="line-height:1.25" transform="translate(27.79 2.5)" word-spacing="0"><tspan x="34.13" y="276.05">Unencrypted link</tspan></text>
163+
<path fill="none" stroke-linecap="round" stroke-width="1.67" d="M222.6 184.1c-2.6-15.27 8.95-23.6 18.43-38.86m186.75 45.61c-.68-10.17-9.4-17.68-18.08-23.49"/>
164+
<path fill="none" stroke-linecap="round" stroke-width="1.67" d="M240.99 153.41c.35-3.41 1.19-6.17.04-8.17m-7.15 5.48c1.83-2.8 4.58-4.45 7.15-5.48"/>
165+
<path fill="none" stroke-linecap="round" stroke-width="1.67" d="M412.43 173.21c-2.2-3.15-2.54-3.85-2.73-5.85m0 0c2.46-.65 3.85.01 6.67 1.24M61.62 40.8C48.89 36.98 36.45 27.54 36.9 18.96M61.62 40.8c.05-2.58-3.58-4.8-5.25-5.26m-2.65 6.04c1.8.54 6.8 1.31 7.9-.78"/>
166+
<path fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.44" d="M1.22 229.4h247.74v63.1H1.22z"/>
167+
</g>
168+
</svg>
169+
</p>
170+
171+
<p><a href="https://nym.com/about/mixnet">Read more about how Nym works.</a></p>
172+
173+
<p>
174+
Nym relies on a growing ecosystem of users, developers and researcher partners
175+
aligned with the mission to make sure Nym software is running, remains usable
176+
and solves real problems. While Nym is not designed for malicious computer
177+
users, it is true that they can use the network for malicious ends. This
178+
is largely because criminals and hackers have significantly better access to
179+
privacy and anonymity than do the regular users whom they prey upon. Criminals
180+
can and do build, sell, and trade far larger and more powerful networks than
181+
Nym on a daily basis. Thus, in the mind of this operator, the social need for
182+
easily accessible censorship-resistant private, anonymous communication trumps
183+
the risk of unskilled bad actors, who are almost always more easily uncovered
184+
by traditional police work than by extensive monitoring and surveillance anyway.
185+
</p>
186+
187+
<p>
188+
In terms of applicable law, the best way to understand Nym is to consider it a
189+
network of routers operating as common carriers, much like the Internet
190+
backbone. However, unlike the Internet backbone routers, Nym mixnodes do not
191+
contain identifiable routing information about the source of a packet and do
192+
mix the user internet traffic with that of other users, making communications
193+
private and protecting not just the user content but the metadata
194+
(user's IP address, who the user talks to, when, where, from what device and
195+
more) and no single Nym node can determine both the origin and destination
196+
of a given transmission.
197+
</p>
198+
199+
<p>
200+
As such, there is nothing the operator of this Exit Gateway can do to help you
201+
track the connection further. This Exit Gateway maintains no logs of any of the
202+
Nym Network, so there is little that can be done to trace either legitimate or
203+
illegitimate traffic and most importantly the operator cannot tell apart one from
204+
the other because of the cryptography design making such selection impossible
205+
for the operator. Attempts to seize this router will accomplish nothing.
206+
</p>
207+
208+
<p>
209+
To decentralise and enable privacy for a broad range of services, this
210+
Exit Gateway adopts an <a href="https://nymtech.net/.wellknown/network-requester/exit-policy.txt">Exit Policy</a>
211+
serving as a safeguard.
212+
</p>
213+
214+
<p>
215+
That being said, if you still have a complaint about the router, you may email the
216+
<a data-mailto>maintainer</a>. If complaints are related to a particular service that is being abused,
217+
the maintainer will submit that to the NYM Operators Community in order to add it to the Exit Policy cited above.
218+
The community governance can only blacklist entire IP:port destinations across the entire network.
219+
</p>
220+
221+
<p>
222+
You also have the option of blocking this IP address and others on the Nym network if you so desire.
223+
The Nym project provides a <a href="https://nym.com/explorer">
224+
web service</a> to fetch a list of all IP addresses of Nym Gateway Exit nodes that allow exiting to a
225+
specified IP:port combination. Please be considerate when using these options.
226+
</p>
227+
<p style="text-align:center">
228+
<img
229+
class="logo"
230+
src="https://raw.githubusercontent.com/nymtech/websites/main/www/nym.com/public/images/Nym_meta_Image.png"
231+
alt=""
232+
style="max-width:320px;width:100%;height:auto"
233+
onerror="this.onerror=null;this.src='/images/nym_logo.png';"
234+
/>
235+
</p>
236+
</main>
23237
</body>
24238
</html>

scripts/nym-node-setup/setup-nginx-proxy-wss.sh

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,28 +63,73 @@ cert_ok() {
6363
[[ -s "/etc/letsencrypt/live/${HOSTNAME}/fullchain.pem" && -s "/etc/letsencrypt/live/${HOSTNAME}/privkey.pem" ]]
6464
}
6565

66-
fetch_landing() {
66+
fetch_landing_html() {
6767
local url="https://raw.githubusercontent.com/nymtech/nym/refs/heads/feature/node-setup-cli/scripts/nym-node-setup/landing-page.html"
68+
mkdir -p "${WEBROOT}"
69+
6870
if command -v curl >/dev/null 2>&1; then
6971
curl -fsSL "$url" -o "${WEBROOT}/index.html" || true
7072
else
7173
wget -qO "${WEBROOT}/index.html" "$url" || true
7274
fi
75+
7376
if [[ ! -s "${WEBROOT}/index.html" ]]; then
7477
cat > "${WEBROOT}/index.html" <<'HTML'
75-
<!doctype html><html><head><meta charset="utf-8"><title>Nym Node</title></head>
76-
<body style="font-family:sans-serif;margin:2rem">
77-
<h1>Nym node landing</h1>
78-
<p>This is a placeholder page served by nginx.</p>
79-
</body></html>
78+
<!DOCTYPE html>
79+
<html lang="en">
80+
<head>
81+
<meta charset="UTF-8">
82+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
83+
<title>Nym Exit Gateway</title>
84+
<style>
85+
body {
86+
font-family: sans-serif;
87+
text-align: center;
88+
padding: 2em;
89+
background-color: #111;
90+
color: #0ff;
91+
}
92+
h1 {
93+
margin-bottom: 0.5em;
94+
}
95+
</style>
96+
</head>
97+
<body>
98+
<h1>Nym Exit Gateway</h1>
99+
<p>This is a Nym Exit Gateway. The operator of this router has no access to any of the data routing through that due to encryption design.</p>
100+
</body>
101+
</html>
102+
HTML
103+
80104
HTML
81105
fi
82106
}
83107

108+
inject_email() {
109+
if [[ -n "${EMAIL:-}" ]]; then
110+
sed -i "s|<meta name=\"contact:email\" content=\"[^\"]*\"|<meta name=\"contact:email\" content=\"${EMAIL}\"|" \
111+
"${WEBROOT}/index.html"
112+
fi
113+
}
114+
115+
fetch_logo() {
116+
local logo_url=" https://raw.githubusercontent.com/nymtech/websites/refs/heads/main/www/nym.com/public/images/Nym_meta_Image.png?token=GHSAT0AAAAAACEERII7URYRTFACZ4F2OWZ42GMCPBQ"
117+
mkdir -p "${WEBROOT}/images"
118+
if [[ ! -s "${WEBROOT}/images/nym_logo.png" ]]; then
119+
if command -v curl >/dev/null 2>&1; then
120+
curl -fsSL "$logo_url" -o "${WEBROOT}/images/nym_logo.png" || true
121+
else
122+
wget -qO "${WEBROOT}/images/nym_logo.png" "$logo_url" || true
123+
fi
124+
fi
125+
}
126+
84127
reload_nginx() { nginx -t && systemctl reload nginx; }
85128

86129
# landing page (idempotent)
87130
fetch_landing
131+
inject_email
132+
fetch_logo
88133
echo "Landing page at ${WEBROOT}/index.html"
89134

90135
# disable default and stale SSL configs

0 commit comments

Comments
 (0)