@@ -7,6 +7,8 @@ Source root: source/
77PORT REGISTRY (authoritative reference)
88================================================================================
99
10+ 49133 WeatherServer Current weather by city or lat,lon (wttr.in)
11+ 49144 BinaryHttpServer Binary data → HTTP link (PUT/GET to Apache2 dir)
1012 49152 NitroWebExpress (WebExpress) Telnet proxy / main entry point
1113 49155 ConnectionStatusServer Server health, geo, threads, live IPs
1214 49166 ModuleInstallationService Install / unload / manage NWE modules
@@ -28,6 +30,7 @@ ENTRY POINT
2830Main (source/Main.java)
2931 Port constants:
3032 WEBEXPRESS_PORT = 49152
33+ BINARY_HTTP_SERVER_PORT = http.BinaryHttpServer.PORT (49144)
3134 AES2_WEBEXPRESS_SERVER_SOCKET = 5512
3235 BITCOIN_WEBEXPRESS_SERVER_SOCKET = 6682
3336 RSA_WEBEXPRESS_SERVER_SOCKET = NitroWebExpress.Aspect.RSACompliant.DEFAULT_PORT
@@ -51,6 +54,8 @@ Main (source/Main.java)
5154 ASCII_CREATOR → ASCIICreatorServer (49177)
5255 MODULE_LOADER_DAEMON → ModuleLoaderDaemon (49188)
5356 COMMUNICATOR → Communicator (49199)
57+ BINARY_HTTP → BinaryHttpServer (49144)
58+ WEATHER → WeatherServer (49133)
5459 ANTIVIRUS → AntivirusScanner (no port; scheduled daemon)
5560 MySQLComponent → N21Store init
5661 N21XmlFallback.replayFallback()
@@ -188,6 +193,45 @@ connections.logic.IPGeoParser IP → GeoInfo (city, country, region, lat, lon,
188193connections.RecordedConnections / InternationalConnections / NationalConnections
189194connections.GalacticConnections / MexicoConnections
190195
196+ ================================================================================
197+ WEATHER SERVER (source/weather/)
198+ ================================================================================
199+
200+ weather.WeatherServer (extends Thread, daemon) PORT = 49133
201+ Banner: "[ NWE port 49133 — Weather Service ]"
202+ Backend: wttr.in?format=3 (no API key; plain-text one-liner response)
203+ Commands:
204+ <city> Current weather for a city name (e.g. "Tokyo")
205+ <lat,lon> Current weather by coordinates (e.g. "35.68,139.69")
206+ lang <code> LanguagePack language switch
207+ help Show command list
208+ quit Disconnect
209+
210+ ================================================================================
211+ BINARY HTTP SERVER (source/http/)
212+ ================================================================================
213+
214+ http.BinaryHttpServer (extends Thread, daemon) PORT = 49144
215+ Apache dir: /var/www/html/nwe (override via <apache-root> in nwe-config.xml)
216+ Public URL: http://localhost/nwe (override via <apache-url> in nwe-config.xml)
217+
218+ Protocol (raw TCP, newline-framed header then binary payload):
219+
220+ PUT <filename>\n
221+ <4-byte big-endian length><binary bytes>
222+ → writes file to apache-root/<8-char-uuid>-<filename>
223+ → returns: OK http://localhost/nwe/<uuid>-<filename>
224+
225+ GET <url>\n
226+ → downloads http/https URL (10s connect / 30s read timeout)
227+ → saves to apache-root/<8-char-uuid>-<basename>
228+ → returns: OK http://localhost/nwe/<uuid>-<basename>
229+
230+ Security:
231+ - Only http/https GET URLs accepted (no file://, no arbitrary schemes)
232+ - Filenames stripped to [a-zA-Z0-9._-] via safeName()
233+ - Path.getFileName() used to prevent directory traversal on both PUT and GET
234+
191235================================================================================
192236COMMUNICATOR (source/communicator/)
193237================================================================================
@@ -398,6 +442,8 @@ NWE opens 10 public TCP ports at startup (all gated by nwe-config.xml):
398442
399443 PORT SERVICE PURPOSE
400444 ───── ──────────────────────── ─────────────────────────────────────────────
445+ 49133 WeatherServer Current weather by city or lat,lon via wttr.in
446+ 49144 BinaryHttpServer Binary → HTTP link; PUT binary or GET URL → Apache2 dir
401447 49152 NitroWebExpress Main entry; telnet proxy; AES/BTC bridge hub
402448 5512 AESCompliant AES 2.0 DSS 5.0 encryption sub-server
403449 6682 BitcoinCompliant Bitcoin lightweight trading sub-server
0 commit comments