Compare commits

...

11 Commits

Author SHA1 Message Date
4cd70e02c7 Set minimum dimensions for windows 2025-05-20 09:02:08 -07:00
44f5d51cb1 Add .gitignore 2025-05-19 20:08:48 -07:00
47d89cb32c Update overview image 2025-05-19 20:08:39 -07:00
961cdc897a Move divider between app controls and station controls 2025-05-19 20:08:29 -07:00
13ab7b82db Flesh out help 2025-05-19 19:28:55 -07:00
d138ea3ad6 Add about page 2025-05-19 19:28:34 -07:00
13355ce401 Factor out config path 2025-05-19 19:28:05 -07:00
e559508507 Change feed type to atom 2025-04-21 19:37:35 -07:00
e0a8a237a4 Fix some text alignment 2025-04-17 22:04:59 -07:00
8bd9e4c356 Add readme
Mostly project-tracking stuff right now
2025-04-17 21:33:50 -07:00
30456c7b7e Add UI mock-up
For posterity
2025-04-17 21:33:21 -07:00
18 changed files with 989 additions and 38 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
target/

397
mockup.drawio Normal file
View File

@ -0,0 +1,397 @@
<mxfile host="Electron" modified="2025-01-11T07:22:18.441Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/22.0.3 Chrome/114.0.5735.289 Electron/25.8.4 Safari/537.36" etag="-S0tjDxWuqk8ykO7LYgZ" version="22.0.3" type="device" pages="4">
<diagram id="KgfOMPHdpzIXCQJiCugH" name="number-station">
<mxGraphModel dx="1407" dy="818" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="400" pageHeight="400" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="KV5Y_ph4G12SrxRSiY-e-1" value="Select Station" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="175" y="10" width="95" height="30" as="geometry" />
</mxCell>
<mxCell id="2tEYRVNANGzc1R6FI9Mg-2" value="My Station" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="70" y="10" width="95" height="30" as="geometry" />
</mxCell>
<mxCell id="2tEYRVNANGzc1R6FI9Mg-3" value="Station:" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="10" y="15" width="60" height="20" as="geometry" />
</mxCell>
<mxCell id="2tEYRVNANGzc1R6FI9Mg-5" value="" style="endArrow=none;html=1;rounded=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="10" y="50" as="sourcePoint" />
<mxPoint x="390" y="50" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="aKKJJGnMUioiqIyPZD_M-1" value="0000 0000 0000 0000&lt;br style=&quot;font-size: 27px;&quot;&gt;0000 0000 0000 0000&lt;br style=&quot;font-size: 27px;&quot;&gt;0000 0000 0000 0000&lt;br style=&quot;font-size: 27px;&quot;&gt;0000 0000 0000 0000&lt;br style=&quot;font-size: 27px;&quot;&gt;0000 0000 0000 0000" style="rounded=0;whiteSpace=wrap;html=1;align=left;verticalAlign=top;fontSize=27;" parent="1" vertex="1">
<mxGeometry x="10" y="100" width="380" height="250" as="geometry" />
</mxCell>
<mxCell id="OoXu6EN54UF7In_Oly40-1" value="⚙" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="360" y="59" width="30" height="30" as="geometry" />
</mxCell>
<mxCell id="fAEDDr1aK9oPJae2LnTb-1" value="Set as next message" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="270" y="360" width="120" height="30" as="geometry" />
</mxCell>
<mxCell id="F0W2USit5zVsF5LBhS4k-1" value="Next run time: 2024-12-24T14:17:28" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="10" y="59" width="220" height="30" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
<diagram id="k80YQdDor6Hn9XSC-wS4" name="number-station-config">
<mxGraphModel dx="366" dy="658" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="400" pageHeight="400" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="qGrX5IwpEfruhJfUPI0G-1" value="Select Station" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="175" y="10" width="95" height="30" as="geometry" />
</mxCell>
<mxCell id="m5zdCg8UaHyb6ajvu_Qv-2" value="My Station" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="70" y="10" width="95" height="30" as="geometry" />
</mxCell>
<mxCell id="m5zdCg8UaHyb6ajvu_Qv-3" value="Station:" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="10" y="15" width="60" height="20" as="geometry" />
</mxCell>
<mxCell id="m5zdCg8UaHyb6ajvu_Qv-5" value="" style="endArrow=none;html=1;rounded=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="10" y="50" as="sourcePoint" />
<mxPoint x="390" y="50" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="b2T8TMgS7kride2Pq7S0-1" value="Digit group size:&lt;br&gt;(only for display)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="10" y="70" width="100" height="20" as="geometry" />
</mxCell>
<mxCell id="b2T8TMgS7kride2Pq7S0-2" value="4" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="110" y="65" width="30" height="30" as="geometry" />
</mxCell>
<mxCell id="b2T8TMgS7kride2Pq7S0-3" value="⬆" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="150" y="65" width="20" height="15" as="geometry" />
</mxCell>
<mxCell id="b2T8TMgS7kride2Pq7S0-4" value="⬇" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="150" y="80" width="20" height="15" as="geometry" />
</mxCell>
<mxCell id="O_Ejp8n0P8FWgRvxlbZu-1" value="Save" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="330" y="760" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="-kJYHnf-wgmOerafxR5x-1" value="Number station address:" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="140" y="160" width="145" height="30" as="geometry" />
</mxCell>
<mxCell id="-kJYHnf-wgmOerafxR5x-2" value="https://my-number-station.com/blog.html" style="rounded=0;whiteSpace=wrap;html=1;align=left;" parent="1" vertex="1">
<mxGeometry x="150" y="190" width="241.25" height="30" as="geometry" />
</mxCell>
<mxCell id="qLbXf6SKdaKwf-JNIX5Q-1" value="Send messages via:" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="10" y="160" width="120" height="30" as="geometry" />
</mxCell>
<mxCell id="qLbXf6SKdaKwf-JNIX5Q-2" value="FTP" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="50" y="190" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="qLbXf6SKdaKwf-JNIX5Q-3" value="SFTP" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="50" y="220" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="qLbXf6SKdaKwf-JNIX5Q-4" value="SCP" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="50" y="250" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="qLbXf6SKdaKwf-JNIX5Q-5" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;labelBackgroundColor=none;fillColor=#000000;" parent="1" vertex="1">
<mxGeometry x="30" y="200" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="qLbXf6SKdaKwf-JNIX5Q-6" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" parent="1" vertex="1">
<mxGeometry x="30" y="230" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="qLbXf6SKdaKwf-JNIX5Q-7" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" parent="1" vertex="1">
<mxGeometry x="30" y="260" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="qLbXf6SKdaKwf-JNIX5Q-8" value="Username:" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="218.75" y="230" width="67.5" height="30" as="geometry" />
</mxCell>
<mxCell id="qLbXf6SKdaKwf-JNIX5Q-9" value="Password:" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="218.75" y="260" width="67.5" height="30" as="geometry" />
</mxCell>
<mxCell id="qLbXf6SKdaKwf-JNIX5Q-10" value="user" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="296.25" y="235" width="95" height="20" as="geometry" />
</mxCell>
<mxCell id="qLbXf6SKdaKwf-JNIX5Q-11" value="pass" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="296.25" y="265" width="95" height="20" as="geometry" />
</mxCell>
<mxCell id="qLbXf6SKdaKwf-JNIX5Q-12" value="Message length:" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="190" y="70" width="100" height="20" as="geometry" />
</mxCell>
<mxCell id="qLbXf6SKdaKwf-JNIX5Q-13" value="80" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="290" y="65" width="30" height="30" as="geometry" />
</mxCell>
<mxCell id="qLbXf6SKdaKwf-JNIX5Q-14" value="⬆" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="330" y="65" width="20" height="15" as="geometry" />
</mxCell>
<mxCell id="qLbXf6SKdaKwf-JNIX5Q-15" value="⬇" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="330" y="80" width="20" height="15" as="geometry" />
</mxCell>
<mxCell id="LwcL28te8jDykbwldkZH-1" value="Prefixes:&lt;br&gt;(dummy messages won&#39;t be sent with these prefixes)" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="20" y="350" width="290" height="50" as="geometry" />
</mxCell>
<mxCell id="LwcL28te8jDykbwldkZH-2" value="" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="20" y="395" width="260" height="170" as="geometry" />
</mxCell>
<mxCell id="LwcL28te8jDykbwldkZH-3" value="9293 8500" style="rounded=0;whiteSpace=wrap;html=1;align=left;" parent="1" vertex="1">
<mxGeometry x="30" y="405" width="240" height="30" as="geometry" />
</mxCell>
<mxCell id="LwcL28te8jDykbwldkZH-4" value="0032 9381" style="rounded=0;whiteSpace=wrap;html=1;align=left;" parent="1" vertex="1">
<mxGeometry x="30" y="435" width="240" height="30" as="geometry" />
</mxCell>
<mxCell id="LwcL28te8jDykbwldkZH-5" value="..." style="rounded=0;whiteSpace=wrap;html=1;align=left;" parent="1" vertex="1">
<mxGeometry x="30" y="465" width="240" height="30" as="geometry" />
</mxCell>
<mxCell id="LwcL28te8jDykbwldkZH-6" value="+" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="240" y="525" width="30" height="30" as="geometry" />
</mxCell>
<mxCell id="LwcL28te8jDykbwldkZH-7" value="-" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="240" y="405" width="30" height="30" as="geometry" />
</mxCell>
<mxCell id="LwcL28te8jDykbwldkZH-8" value="-" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="240" y="435" width="30" height="30" as="geometry" />
</mxCell>
<mxCell id="enA9nok_1hsDVz6vXJ0Y-1" value="" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="10" y="580" width="380" height="150" as="geometry" />
</mxCell>
<mxCell id="enA9nok_1hsDVz6vXJ0Y-2" value="Schedule:" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="10" y="580" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="enA9nok_1hsDVz6vXJ0Y-3" value="" style="whiteSpace=wrap;html=1;aspect=fixed;" parent="1" vertex="1">
<mxGeometry x="20" y="610" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="enA9nok_1hsDVz6vXJ0Y-4" value="Manage schedule externally" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="30" y="600" width="160" height="30" as="geometry" />
</mxCell>
<mxCell id="enA9nok_1hsDVz6vXJ0Y-5" value="Daily" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="50" y="630" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="enA9nok_1hsDVz6vXJ0Y-6" value="Weekly" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="50" y="660" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="enA9nok_1hsDVz6vXJ0Y-7" value="Monthly" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="50" y="690" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="enA9nok_1hsDVz6vXJ0Y-8" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;labelBackgroundColor=none;fillColor=#000000;" parent="1" vertex="1">
<mxGeometry x="30" y="640" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="enA9nok_1hsDVz6vXJ0Y-9" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" parent="1" vertex="1">
<mxGeometry x="30" y="670" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="enA9nok_1hsDVz6vXJ0Y-10" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" parent="1" vertex="1">
<mxGeometry x="30" y="700" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="enA9nok_1hsDVz6vXJ0Y-11" value="Start date:" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="120" y="630" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="enA9nok_1hsDVz6vXJ0Y-12" value="2024-12-25 08:10:36" style="rounded=0;whiteSpace=wrap;html=1;align=left;" parent="1" vertex="1">
<mxGeometry x="120" y="660" width="170" height="30" as="geometry" />
</mxCell>
<mxCell id="enA9nok_1hsDVz6vXJ0Y-13" value="✍" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="300" y="660" width="30" height="30" as="geometry" />
</mxCell>
<mxCell id="yshJ9rjgNk4pQpEHdTG9-1" value="External program" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="50" y="280" width="100" height="30" as="geometry" />
</mxCell>
<mxCell id="yshJ9rjgNk4pQpEHdTG9-2" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" parent="1" vertex="1">
<mxGeometry x="30" y="290" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="yshJ9rjgNk4pQpEHdTG9-4" value="program-to-execute" style="rounded=0;whiteSpace=wrap;html=1;align=left;" parent="1" vertex="1">
<mxGeometry x="50" y="310" width="340" height="30" as="geometry" />
</mxCell>
<mxCell id="lrg_OsaujHVCrS9Fx4xL-1" value="Groups in line:&lt;br&gt;(only for display)" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="10" y="115" width="100" height="20" as="geometry" />
</mxCell>
<mxCell id="lrg_OsaujHVCrS9Fx4xL-2" value="4" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="110" y="110" width="30" height="30" as="geometry" />
</mxCell>
<mxCell id="lrg_OsaujHVCrS9Fx4xL-3" value="⬆" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="150" y="110" width="20" height="15" as="geometry" />
</mxCell>
<mxCell id="lrg_OsaujHVCrS9Fx4xL-4" value="⬇" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="150" y="125" width="20" height="15" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
<diagram name="listener" id="lENoe73DJEgTFmveM3ib">
<mxGraphModel dx="1235" dy="723" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="400" pageHeight="400" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="SujNhtosm1HRNQAcBG4O-1" value="Select Station" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="175" y="10" width="95" height="30" as="geometry" />
</mxCell>
<mxCell id="wbM6wd7tqMI0IAmKtTY0-1" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="10" y="119" width="380" height="270" as="geometry" />
</mxCell>
<mxCell id="wbM6wd7tqMI0IAmKtTY0-2" value="9293 8500 &lt;font color=&quot;#9c9c9c&quot;&gt;1823 2298 2301&lt;/font&gt;" style="rounded=0;whiteSpace=wrap;html=1;align=left;" vertex="1" parent="1">
<mxGeometry x="20" y="129" width="360" height="30" as="geometry" />
</mxCell>
<mxCell id="wbM6wd7tqMI0IAmKtTY0-3" value="..." style="rounded=0;whiteSpace=wrap;html=1;align=left;" vertex="1" parent="1">
<mxGeometry x="20" y="159" width="360" height="30" as="geometry" />
</mxCell>
<mxCell id="wbM6wd7tqMI0IAmKtTY0-4" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="20" y="189" width="360" height="30" as="geometry" />
</mxCell>
<mxCell id="wbM6wd7tqMI0IAmKtTY0-5" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="20" y="219" width="360" height="30" as="geometry" />
</mxCell>
<mxCell id="wbM6wd7tqMI0IAmKtTY0-6" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="20" y="249" width="360" height="30" as="geometry" />
</mxCell>
<mxCell id="wbM6wd7tqMI0IAmKtTY0-7" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="20" y="279" width="360" height="30" as="geometry" />
</mxCell>
<mxCell id="wbM6wd7tqMI0IAmKtTY0-8" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="20" y="309" width="360" height="30" as="geometry" />
</mxCell>
<mxCell id="wbM6wd7tqMI0IAmKtTY0-9" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="20" y="339" width="360" height="30" as="geometry" />
</mxCell>
<mxCell id="wbM6wd7tqMI0IAmKtTY0-10" value="Retrieve Now" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="230" y="59" width="100" height="30" as="geometry" />
</mxCell>
<mxCell id="wbM6wd7tqMI0IAmKtTY0-17" value="My Station" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="70" y="10" width="95" height="30" as="geometry" />
</mxCell>
<mxCell id="4qhGAahRBXyE9qeNDtCE-1" value="Last retrieved: 2024-12-24T14:17:28" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="10" y="59" width="220" height="30" as="geometry" />
</mxCell>
<mxCell id="4qhGAahRBXyE9qeNDtCE-2" value="Messages:" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="10" y="89" width="80" height="30" as="geometry" />
</mxCell>
<mxCell id="4qhGAahRBXyE9qeNDtCE-3" value="Station:" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="10" y="15" width="60" height="20" as="geometry" />
</mxCell>
<mxCell id="gv7KOfe7MxGHTGDHY-RI-1" value="⚙" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="360" y="59" width="30" height="30" as="geometry" />
</mxCell>
<mxCell id="gv7KOfe7MxGHTGDHY-RI-2" value="" style="endArrow=none;html=1;rounded=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="10" y="50" as="sourcePoint" />
<mxPoint x="390" y="50" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="v50buFrmnss8UQ5S-Iks-1" value="2024-12-24" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="300" y="129" width="80" height="30" as="geometry" />
</mxCell>
<mxCell id="v50buFrmnss8UQ5S-Iks-2" value="2024-12-23" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="300" y="159" width="80" height="30" as="geometry" />
</mxCell>
<mxCell id="v50buFrmnss8UQ5S-Iks-3" value="2024-12-22" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="300" y="189" width="80" height="30" as="geometry" />
</mxCell>
<mxCell id="v50buFrmnss8UQ5S-Iks-4" value="2024-12-21" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="300" y="219" width="80" height="30" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
<diagram id="E8TrwcYXImFw0jUs4Aw0" name="listener-config">
<mxGraphModel dx="811" dy="475" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="400" pageHeight="400" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="rOGrzmU35Bv_lXtv-dQQ-1" value="Prefixes:" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="20" y="220" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="rOGrzmU35Bv_lXtv-dQQ-2" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="10" y="250" width="260" height="170" as="geometry" />
</mxCell>
<mxCell id="rOGrzmU35Bv_lXtv-dQQ-3" value="9293 8500" style="rounded=0;whiteSpace=wrap;html=1;align=left;" vertex="1" parent="1">
<mxGeometry x="20" y="260" width="240" height="30" as="geometry" />
</mxCell>
<mxCell id="rOGrzmU35Bv_lXtv-dQQ-4" value="0032 9381" style="rounded=0;whiteSpace=wrap;html=1;align=left;" vertex="1" parent="1">
<mxGeometry x="20" y="290" width="240" height="30" as="geometry" />
</mxCell>
<mxCell id="rOGrzmU35Bv_lXtv-dQQ-5" value="..." style="rounded=0;whiteSpace=wrap;html=1;align=left;" vertex="1" parent="1">
<mxGeometry x="20" y="320" width="240" height="30" as="geometry" />
</mxCell>
<mxCell id="rOGrzmU35Bv_lXtv-dQQ-7" value="https://my-number-station.com/blog.html" style="rounded=0;whiteSpace=wrap;html=1;align=left;" vertex="1" parent="1">
<mxGeometry x="30" y="120" width="350" height="30" as="geometry" />
</mxCell>
<mxCell id="dexWjz7qNybDygiiIq_V-1" value="My Station" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="70" y="10" width="95" height="30" as="geometry" />
</mxCell>
<mxCell id="dexWjz7qNybDygiiIq_V-2" value="Station:" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="10" y="15" width="60" height="20" as="geometry" />
</mxCell>
<mxCell id="dexWjz7qNybDygiiIq_V-3" value="Select Station" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="175" y="10" width="95" height="30" as="geometry" />
</mxCell>
<mxCell id="Gh-GtSVz8Y2JwdWB56_--1" value="" style="endArrow=none;html=1;rounded=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="10" y="50" as="sourcePoint" />
<mxPoint x="390" y="50" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="6y2arMDsUTsDNsxs1FtR-2" value="+" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="230" y="380" width="30" height="30" as="geometry" />
</mxCell>
<mxCell id="6y2arMDsUTsDNsxs1FtR-3" value="-" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="230" y="260" width="30" height="30" as="geometry" />
</mxCell>
<mxCell id="6y2arMDsUTsDNsxs1FtR-4" value="-" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="230" y="290" width="30" height="30" as="geometry" />
</mxCell>
<mxCell id="6y2arMDsUTsDNsxs1FtR-5" value="Save" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="330" y="760" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="skUOlehON0tLIMdoaJ7T-1" value="Retrieve messages from:" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="10" y="60" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="skUOlehON0tLIMdoaJ7T-2" value="Website" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="30" y="86" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="skUOlehON0tLIMdoaJ7T-3" value="External program" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="30" y="160" width="100" height="30" as="geometry" />
</mxCell>
<mxCell id="skUOlehON0tLIMdoaJ7T-4" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;labelBackgroundColor=none;fillColor=#000000;" vertex="1" parent="1">
<mxGeometry x="10" y="96" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="skUOlehON0tLIMdoaJ7T-5" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
<mxGeometry x="10" y="170" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="skUOlehON0tLIMdoaJ7T-6" value="program-to-execute" style="rounded=0;whiteSpace=wrap;html=1;align=left;" vertex="1" parent="1">
<mxGeometry x="30" y="190" width="350" height="30" as="geometry" />
</mxCell>
<mxCell id="skUOlehON0tLIMdoaJ7T-7" value="?" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="130" y="165" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="6MllUsjUtkag9fbClZZq-1" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="10" y="430" width="380" height="150" as="geometry" />
</mxCell>
<mxCell id="6MllUsjUtkag9fbClZZq-2" value="Schedule:" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="10" y="430" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="6MllUsjUtkag9fbClZZq-3" value="" style="whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
<mxGeometry x="20" y="460" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="6MllUsjUtkag9fbClZZq-4" value="Manage schedule externally" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="30" y="450" width="160" height="30" as="geometry" />
</mxCell>
<mxCell id="6MllUsjUtkag9fbClZZq-5" value="Daily" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="50" y="480" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="6MllUsjUtkag9fbClZZq-6" value="Weekly" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="50" y="510" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="6MllUsjUtkag9fbClZZq-7" value="Monthly" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="50" y="540" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="6MllUsjUtkag9fbClZZq-8" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;labelBackgroundColor=none;fillColor=#000000;" vertex="1" parent="1">
<mxGeometry x="30" y="490" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="6MllUsjUtkag9fbClZZq-9" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
<mxGeometry x="30" y="520" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="6MllUsjUtkag9fbClZZq-10" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
<mxGeometry x="30" y="550" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="6MllUsjUtkag9fbClZZq-11" value="Start date:" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="120" y="480" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="6MllUsjUtkag9fbClZZq-12" value="2024-12-25 08:10:36" style="rounded=0;whiteSpace=wrap;html=1;align=left;" vertex="1" parent="1">
<mxGeometry x="120" y="510" width="170" height="30" as="geometry" />
</mxCell>
<mxCell id="6MllUsjUtkag9fbClZZq-13" value="✍" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="300" y="510" width="30" height="30" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

19
pom.xml
View File

@ -126,6 +126,25 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
<version>9.0.1</version>
<executions>
<execution>
<id>get-the-git-infos</id>
<goals>
<goal>revision</goal>
</goals>
<phase>initialize</phase>
</execution>
</executions>
<configuration>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
<commitIdGenerationMode>full</commitIdGenerationMode>
</configuration>
</plugin>
</plugins>
</build>
</project>

144
readme.txt Normal file
View File

@ -0,0 +1,144 @@
For sending secret messages and dummy messages regularly. It is meant to be used in conjunction with one-time pads. One-time pads provide perfect security for the message itself (if they are handled properly), but adversaries can still tell that messages are being sent, and when they are being sent. To avoid this, dummy messages are uploaded to a website on a regular basis. The messages can also be hidden using steganography.
This application should not be considered secure, and no sensitive information should be entered into it.
Baseline is that the number station will generate a dummy random message, optionally obscure it via steganography, then upload it to an (s)ftp/scp server.
The random message generation actually happens last, so that, next time it is run, the existing message will be uploaded. This way a real message can be generated in the meantime and the next upload time the real message will be uploaded. Because the real message looks random to anyone without the corresponding one-time pad, it cannot be distinguished from the dummy messages.
# Number Station Listener
This application periodically checks a site for numbers and stores them so the user can check whether the message matches any pads.
# Notes
Should have sane defaults, but be built to be part of a more extensible system. Should be able to run other commands for message generation / upload.
Need to be able to support multiple profiles for each.
## Tech
- Installers: JPackage
- Notifications: https://github.com/sshtools/two-slices/blob/master/README.md
- Post to wordpress: https://github.com/ashri/java-wordpress-api/tree/master
## Security considerations
If someone were to take any part of the number station (this software, the server, or intercepting on the way to the recipient), then they could make sure no messages get through (though they couldn't spoof messages without access to the one-time pads).
This weakness is true of nearly all communication methods though. The only way to be certain a message was received is to receive an acknowledgement back.
# Settings/State Format
$XDG_CONFIG_HOME/numbers-station/main-settings.xml
$XDG_CONFIG_HOME/numbers-station/listener-settings.xml
$XDG_STATE_HOME/numbers-station/main.log
$XDG_STATE_HOME/numbers-station/listener.log
$XDG_STATE_HOME/numbers-station/<station-id>-main/next-message.txt
$XDG_STATE_HOME/numbers-station/<station-id>-main/20250114T091633.txt
$XDG_STATE_HOME/numbers-station/<station-id>-listener/20250114T091735.txt
$XDG_STATE_HOME/numbers-station/<station-id>-listener/20250114T091748-read.txt
XDG dirs:
https://superuser.com/a/1767882
On Windows:
https://stackoverflow.com/questions/43853548/xdg-basedir-directories-for-windows
Library to use:
https://github.com/dirs-dev/directories-jvm
# TODO
- [ ] Undo/Redo in message editing
- [ ] Disable/commandeer right-click menu items for message text (otherwise you can wreck the formatting).
- [ ] Make sure numpad works in message editing
And in prefix editing
- [x] Catch and log all exceptions
- [ ] Add a check that the way we set up the scheduler to run the application will actually work. (need a flag argument that will output something particular we can look for).
- [x] Be able to narrow message area so that columns can match whatever message format you're using (minimum window width would keep you from doing that).
- [x] When station is removed/renamed, need to also remove/rename the scheduled task and the corresponding state directory.
- [x] Check for duplicate station names when creating or renaming
- [ ] Test task scheduler task creation for a windows user not on a domain (author needs to include domain when on domain e.g. EI\nathanm)
- [x] Station names with quotes shouldn't be allowed (or we'll need to do escaping for the launch command)
- [ ] Need to be able to handle case where application is open and the scheduled task runs. There's at least contention for the log file (maybe? doesn't seem to mind if multiple instances of the application are running)
- [ ] In all controllers, error handling should be 1. log error 2. Pop up dialog to warn user
- [x] Settings external schedule management should remove the scheduled task
- [ ] Add tests for generateMessage()
- [x] Load message from next-message
- [x] When making changes to the message, show the changes as unsaved until saved.
- [ ] Ensure all GUI elements have accessibility text
- [ ] Embed versioning info
- [ ] Factor out scheduling into a wrapper class that handles all the os-specific stuff internally.
- [ ] If a station name is run which doesn't exist in settings, but has associated files, then prompt the user to delete the files.
- [ ] Fix behavior when settings file is empty
- [ ] Store schedule time with time zone
- [ ] Add tests for StationSettings.nextSendTime()
Note on jars and javafx: https://stackoverflow.com/a/23121897
# 2025-01-27 JAR packaging
```
$modulePath = "$Env:PATH_TO_FX;P:\personal_root\projects\number-station\lib"
$modules = $(
"com.fasterxml.jackson.annotation",
"com.fasterxml.jackson.core",
"com.fasterxml.jackson.dataformat.xml",
"com.fasterxml.jackson.datatype.jsr310",
"result",
"javafx.controls",
"javafx.fxml",
"org.apache.commons.cli"
)
$addModules = $modules -join ","
java/>jar --create --file numbers-station.jar --manifest .\manifest.txt -C out .
java/>java --module-path $modulePath --add-modules $addModules -jar .\numbers-station.jar
```
TODO: package lib jars with this jar
also:
```
jpackage --input . --name numbers-station --main-jar .\numbers-station.jar --main-class name.nathanmcrae.numbersstation.Main --module-path "$Env:PATH_TO_FX;P:\personal_root\projects\number-station\lib" --add-modules javafx.controls,javafx.fxml,com.fasterxml.jackson.annotation,com.fasterxml.jackson.core,com.fasterxml.jackson.dataformat.xml,com.fasterxml.jackson.datatype.jsr310 --type exe
```
# 2025-02-16
Tried to compile a jfx hello world using the openjdk and openjfx packaged in guix, but ran into issues. It looks like more up-to-date versions of openjfx are not available guix.
Might be the next best step is to depend on a binary release of openjfx and see if I can compile on linux like that. Could even have a custom guix package which depends on the openjfx binary release if needed.
# 2025-03-03
Tried some more packaging, but was getting a lot of "Error: automatic module cannot be used with jlink" issues. Not sure if I just wasn't getting those before or what, but the jpackage command above doesn't work now.
The issue seems to be with having non-modular dependencies. This page has some notes at the bottom about packaging non-modular applications: https://openjfx.io/openjfx-docs/#modular
# 2025-03-09
mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file -Dfile=lib/wordpress-xmlrpc-client-1.1-SNAPSHOT.jar -DgroupId=com.tearsofaunicorn.wordpress -DartifactId=wordpress-xmlrpc-client -Dversion=1.1 -Dpackaging=jar -DlocalRepositoryPath=mvn-repo
mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file -Dfile=lib/xmlrpc-client-3.1.3.jar -DgroupId=wordpress -DartifactId=xmlrpc-client -Dversion=3.1.3 -Dpackaging=jar -DlocalRepositoryPath=mvn-repo
# 2025-03-17
Appears to work. Launch is extremely slow
jpackage --input . --name numbers-station --main-jar .\target\numbersstation-1.0-SNAPSHOT.jar --main-class name.nathanmcrae.numbersstation.MainRun --type app-image --dest $HOME/temp/20250316T153044
Failed to generate msi this time :(
numbers-station/>jpackage --input . --name numbers-station --main-jar .\target\numbersstation-1.0-SNAPSHOT.jar --main-class name.nathanmcrae.numbersstation.MainRun --type exe --dest $HOME/temp/20250317T200941
java.io.IOException: Command [C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe, -nologo, C:\Users\nathanm\AppData\Local\Temp\jdk.jpackage911481192111528806\config\bundle.wxf, -ext, WixUtilExtension, -arch, x64, -out, C:\Users\nathanm\AppData\Local\Temp\jdk.jpackage911481192111528806\wixobj\bundle.wixobj] in C:\Users\nathanm\AppData\Local\Temp\jdk.jpackage911481192111528806\images\win-msi.image\numbers-station exited with 1 code
# 2025-03-22
Did a clean clone and build and it worked.
jpackage --input . --name numbers-station --main-jar .\target\numbersstation-1.0-SNAPSHOT.jar --main-class name.nathanmcrae.numbersstation.MainRun --type exe --win-menu --win-per-user-install --win-shortcut --win-shortcut-prompt --win-upgrade-uuid 956c711b-01f1-46a2-9355-4a6b63ec1ec9 --icon "P:\personal_root\projects\numbers-station\icon.ico" --description "Tool to periodically upload encrypted messages to a website/blog"
---
2025-03-22T20:50:38.212-07:00 INFO name.nathanmcrae.numbersstation.Main main Executable Path: C:\Users\nathanm\AppData\Local\numbers-station\numbers-station.exe

View File

@ -0,0 +1,71 @@
package name.nathanmcrae.numbersstation;
import java.awt.datatransfer.StringSelection;
import java.awt.Toolkit;
import java.awt.datatransfer.Clipboard;
import java.io.IOException;
import java.lang.management.ManagementFactory;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.logging.Logger;
import java.util.logging.Level;
import java.util.Properties;
import javafx.fxml.FXML;
import javafx.scene.control.Alert;
import javafx.scene.control.Alert.AlertType;
import javafx.scene.control.Hyperlink;
import javafx.scene.control.TextField;
public class AboutController {
private static final Logger logger = Logger.getLogger(Main.class.getName());
@FXML
private TextField directoryTextField;
@FXML
private TextField executableTextField;
@FXML
private TextField homepageURLTextField;
@FXML
private TextField logPathTextField;
@FXML
private TextField versionTextField;
@FXML
private void initialize() {
directoryTextField.setText(Main.getConfigPath().toString());
String processName = ManagementFactory.getRuntimeMXBean().getName();
long pid = Long.parseLong(processName.split("@")[0]);
ProcessHandle currentProcess = ProcessHandle.of(pid).orElseThrow();
Path executablePath = currentProcess.info().command().map(Paths::get).orElseThrow();
executableTextField.setText(executablePath.toString());
Properties properties = new Properties();
try {
properties.load(getClass().getClassLoader().getResourceAsStream("git.properties"));
} catch (IOException e) {
logger.log(Level.SEVERE, "Failed to load main view", e);
}
versionTextField.setText(String.valueOf(properties.get("git.commit.id.full")));
homepageURLTextField.setText("https://git.nathanmcrae.name/nathanmcrae/numbers-station");
logPathTextField.setText(Main.getStatePath().resolve("main.log").toString());
}
public void handleAppExecutableButtonPress() {
}
public void handleConfigDirectoryButtonPress() {
}
public void handleLogFilePathButtonPress() {
}
}

View File

@ -28,6 +28,8 @@ import java.nio.file.Paths;
import java.text.SimpleDateFormat;
import java.time.format.DateTimeFormatter;
import java.time.LocalDateTime;
import java.time.ZonedDateTime;
import java.time.ZoneOffset;
import java.util.concurrent.TimeUnit;
import java.util.Date;
import java.util.logging.FileHandler;
@ -50,8 +52,24 @@ public class Main extends Application {
private static final Logger logger = Logger.getLogger(Main.class.getName());
// TODO: get git info
private static final String VERSION = "0.0.1";
private static Path configPath = null;
private static Path statePath = null;
public static Path getConfigPath() {
if (configPath == null) {
String configHome = System.getenv("XDG_CONFIG_HOME");
if (configHome != null && !configHome.isEmpty() && Paths.get(configHome).isAbsolute()) {
configPath = Paths.get(configHome, "numbers-station");
} else {
String userHome = System.getProperty("user.home");
configPath = Paths.get(userHome, ".config", "numbers-station");
}
}
return configPath;
}
public static Path getStatePath() {
if (statePath == null) {
String stateHome = System.getenv("XDG_STATE_HOME");
@ -82,6 +100,9 @@ public class Main extends Application {
NotificationController controller = fxmlLoader.getController();
controller.setNotification(startParams.notification().get());
primaryStage.setMinWidth(350);
primaryStage.setMinHeight(200);
primaryStage.setTitle("Numbers Station");
primaryStage.getIcons().add(new Image(getClass().getResourceAsStream("/icon.png")));
primaryStage.setScene(new Scene(root));
@ -92,6 +113,9 @@ public class Main extends Application {
MainController controller = fxmlLoader.getController();
primaryStage.setMinWidth(480);
primaryStage.setMinHeight(200);
primaryStage.setOnCloseRequest(e -> {
if (!controller.handleCloseRequest()) {
e.consume();
@ -269,14 +293,15 @@ public class Main extends Application {
feed = input.build(new File(rssPath.toString()));
} else {
feed = new SyndFeedImpl();
feed.setFeedType("rss_1.0");
feed.setFeedType("atom_1.0");
feed.setTitle("Blog");
feed.setLink(loadedStation.getAddress());
feed.setDescription("Sample blog");
}
SyndEntry entry = new SyndEntryImpl();
entry.setTitle("TODO: date?");
String timestamp = ZonedDateTime.now(ZoneOffset.UTC).format(DateTimeFormatter.ISO_INSTANT);
entry.setTitle(timestamp);
entry.setLink(loadedStation.getAddress());
SyndContent description = new SyndContentImpl();
@ -286,6 +311,7 @@ public class Main extends Application {
entry.setDescription(description);
feed.getEntries().add(entry);
feed.setPublishedDate(new Date());
Writer writer = new FileWriter(rssPath.toString());
SyndFeedOutput syndFeedOutput = new SyndFeedOutput();

View File

@ -41,6 +41,7 @@ import javafx.stage.Stage;
public class MainController implements Initializable {
private static final Logger logger = Logger.getLogger(Main.class.getName());
private Stage aboutStage;
private Stage helpStage;
private Stage settingsStage;
private Stage selectStationStage;
@ -87,6 +88,8 @@ public class MainController implements Initializable {
controller.setStationNameList(settings.getStations().stream().map(StationSettings::toString).toList());
settingsStage = new Stage();
settingsStage.setMinWidth(600);
settingsStage.setMinHeight(300);
settingsStage.initModality(Modality.APPLICATION_MODAL);
settingsStage.setTitle("Numbers Station Settings");
settingsStage.getIcons().add(new Image(getClass().getResourceAsStream("/icon.png")));
@ -114,6 +117,8 @@ public class MainController implements Initializable {
controller.setSettings(settings);
selectStationStage = new Stage();
selectStationStage.setMinWidth(300);
selectStationStage.setMinHeight(200);
selectStationStage.initModality(Modality.APPLICATION_MODAL);
selectStationStage.setUserData(null);
selectStationStage.setTitle("Numbers Station Selection");
@ -396,12 +401,41 @@ public class MainController implements Initializable {
return true;
}
public void handleAboutButtonPress() {
try {
if (aboutStage == null) {
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/AboutView.fxml"));
Parent root = fxmlLoader.load();
aboutStage = new Stage();
aboutStage.setMinWidth(250);
aboutStage.setMinHeight(230);
aboutStage.setTitle("About Numbers Station");
aboutStage.getIcons().add(new Image(getClass().getResourceAsStream("/icon.png")));
aboutStage.setScene(new Scene(root));
}
if (aboutStage.isShowing()) {
aboutStage.toFront();
} else {
aboutStage.show();
}
} catch (IOException e) {
logger.log(Level.SEVERE, "Exception while opening application about screen", e);
}
}
public void handleHelpButtonPress() {
try {
if (helpStage == null) {
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/HelpView.fxml"));
Parent root = fxmlLoader.load();
helpStage = new Stage();
helpStage.setMinWidth(400);
helpStage.setMinHeight(400);
helpStage.setTitle("Numbers Station Help");
helpStage.getIcons().add(new Image(getClass().getResourceAsStream("/icon.png")));
helpStage.setScene(new Scene(root));

View File

@ -31,17 +31,7 @@ public class MainSettings {
}
public static Path getSettingsFilePath() {
String configHome = System.getenv("XDG_CONFIG_HOME");
Path directoryPath;
if (configHome != null && !configHome.isEmpty() && Paths.get(configHome).isAbsolute()) {
directoryPath = Paths.get(configHome, "numbers-station");
} else {
String userHome = System.getProperty("user.home");
directoryPath = Paths.get(userHome, ".config", "numbers-station");
}
return directoryPath.resolve("main-settings.xml");
return Main.getConfigPath().resolve("main-settings.xml");
}
public ArrayList<StationSettings> getStations() {

View File

@ -128,22 +128,12 @@ public class StationSettings {
}
public Path stationPath() {
String configHome = System.getenv("XDG_CONFIG_HOME");
Path directoryPath;
if (configHome != null && !configHome.isEmpty() && Paths.get(configHome).isAbsolute()) {
directoryPath = Paths.get(configHome, "numbers-station");
} else {
String userHome = System.getProperty("user.home");
directoryPath = Paths.get(userHome, ".config", "numbers-station");
}
String stationDirName = null;
try {
stationDirName = java.net.URLEncoder.encode(name, "UTF-8");
} catch(UnsupportedEncodingException e) {} // We know UTF-8 is supported
return directoryPath.resolve(stationDirName);
return Main.getConfigPath().resolve(stationDirName);
}
public String generateMessage(int generationAttempts) throws MessageGenerationException {

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.text.Font?>
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="209.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="name.nathanmcrae.numbersstation.AboutController">
<children>
<Label layoutX="19.0" layoutY="10.0" text="Application Information">
<font>
<Font size="18.0" />
</font>
</Label>
<Label layoutX="20.0" layoutY="110.0" text="Application executable: " AnchorPane.leftAnchor="20.0" AnchorPane.topAnchor="110.0" />
<Label layoutX="20.0" layoutY="50.0" text="Homepage:" AnchorPane.leftAnchor="20.0" AnchorPane.topAnchor="50.0" />
<Label layoutX="20.0" layoutY="140.0" text="Config directory: " AnchorPane.leftAnchor="20.0" AnchorPane.topAnchor="140.0" />
<Label layoutX="20.0" layoutY="80.0" text="Version:" AnchorPane.leftAnchor="20.0" AnchorPane.topAnchor="80.0" />
<TextField fx:id="versionTextField" editable="false" layoutX="72.0" layoutY="76.0" text="asefa" />
<TextField fx:id="executableTextField" editable="false" layoutX="153.0" layoutY="106.0" prefHeight="25.0" prefWidth="403.0" text="sflejk" AnchorPane.leftAnchor="153.0" AnchorPane.rightAnchor="10.0" />
<TextField fx:id="directoryTextField" editable="false" layoutX="118.0" layoutY="136.0" prefHeight="25.0" prefWidth="437.0" text="afseijl" AnchorPane.leftAnchor="118.0" AnchorPane.rightAnchor="10.0" />
<Label layoutX="20.0" layoutY="168.0" text="Log file: " AnchorPane.leftAnchor="20.0" AnchorPane.topAnchor="170.0" />
<TextField fx:id="logPathTextField" editable="false" layoutX="70.0" layoutY="166.0" prefHeight="25.0" prefWidth="485.0" text="afseijl" AnchorPane.leftAnchor="70.0" AnchorPane.rightAnchor="10.0" />
<TextField fx:id="homepageURLTextField" editable="false" layoutX="89.0" layoutY="46.0" prefHeight="25.0" prefWidth="501.0" text="asefa" AnchorPane.leftAnchor="89.0" AnchorPane.rightAnchor="10.0" />
</children>
</AnchorPane>

View File

@ -55,8 +55,8 @@
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="-Infinity" minHeight="-Infinity" prefHeight="26.5" vgrow="NEVER" />
<RowConstraints maxHeight="-Infinity" minHeight="-Infinity" prefHeight="15.0" vgrow="NEVER" />
<RowConstraints maxHeight="-Infinity" minHeight="-Infinity" prefHeight="42.0" vgrow="NEVER" />
<RowConstraints maxHeight="-Infinity" minHeight="-Infinity" prefHeight="13.5" vgrow="NEVER" />
<RowConstraints maxHeight="1.7976931348623157E308" minHeight="10.0" prefHeight="285.0" vgrow="ALWAYS" />
<RowConstraints maxHeight="-Infinity" minHeight="-Infinity" prefHeight="37.0" vgrow="NEVER" />
</rowConstraints>
@ -64,28 +64,28 @@
<AnchorPane>
<children>
<Button layoutX="228.0" layoutY="1.0" mnemonicParsing="false" onAction="#handleSelectStationButtonPress" text="Select Station" />
<Label layoutY="5.0" prefHeight="17.0" prefWidth="60.0" text="Station: " />
<Label alignment="CENTER_RIGHT" layoutY="5.0" prefHeight="17.0" prefWidth="60.0" text="Station: " textAlignment="RIGHT" />
<TextField fx:id="stationNameField" editable="false" layoutX="68.0" prefHeight="25.0" prefWidth="153.0" style="-fx-background-color: #EEEEEE; -fx-border-color: #AAAAAA;" text="My Station" />
<Button layoutX="602.0" layoutY="1.0" mnemonicParsing="false" onAction="#handleHelpButtonPress" text="Help" AnchorPane.rightAnchor="0.0" />
<Button layoutX="516.0" layoutY="1.0" mnemonicParsing="false" text="Settings" AnchorPane.rightAnchor="52.0" />
<Button layoutX="516.0" layoutY="1.0" mnemonicParsing="false" onAction="#handleAboutButtonPress" text="About" AnchorPane.rightAnchor="52.0" />
</children>
</AnchorPane>
<AnchorPane prefHeight="50.0" prefWidth="640.0" GridPane.rowIndex="1">
<AnchorPane prefHeight="50.0" prefWidth="640.0" GridPane.rowIndex="2">
<children>
<Label layoutX="14.0" text="Next message will be sent:" AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="14.0">
<Label layoutX="10.0" layoutY="7.0" text="Next message will be sent:" AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="7.0">
<font>
<Font size="14.0" />
</font>
</Label>
<Label fx:id="nextSendTimeLabel" layoutX="202.0" layoutY="14.0" text="2024-12-25T12:59:47" AnchorPane.leftAnchor="202.0" AnchorPane.topAnchor="14.0">
<Label fx:id="nextSendTimeLabel" layoutX="202.0" layoutY="7.0" text="2024-12-25T12:59:47" AnchorPane.leftAnchor="202.0" AnchorPane.topAnchor="7.0">
<font>
<Font size="14.0" />
</font>
</Label>
<Button layoutX="516.0" layoutY="13.0" mnemonicParsing="false" onAction="#handleStationSettingsButtonPress" text="Station Settings" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="13.0" />
<Button layoutX="540.5" layoutY="3.0" mnemonicParsing="false" onAction="#handleStationSettingsButtonPress" text="Station Settings" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="3.0" />
</children>
</AnchorPane>
<Separator prefWidth="200.0" GridPane.rowIndex="2" />
<Separator prefHeight="10.0" prefWidth="640.0" GridPane.rowIndex="1" />
<SplitPane fx:id="splitPane" dividerPositions="1.0" prefHeight="272.0" prefWidth="640.0" GridPane.rowIndex="3">
<items>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0">

View File

@ -26,7 +26,7 @@
<children>
<FlowPane alignment="CENTER_LEFT" prefHeight="41.0" prefWidth="640.0">
<children>
<Label prefHeight="17.0" prefWidth="58.0" text="Station: " />
<Label alignment="CENTER_RIGHT" prefHeight="17.0" prefWidth="58.0" text="Station: " />
<TextField fx:id="stationNameField" style="-fx-border-color: #AAAAAA;" text="My Station">
<FlowPane.margin>
<Insets right="10.0" />
@ -42,7 +42,7 @@
<children>
<FlowPane alignment="CENTER_LEFT" layoutX="8.0" layoutY="7.0" prefHeight="63.0" prefWidth="229.0">
<children>
<Label prefHeight="38.0" prefWidth="116.0" text="Digit group size: (only for display)" textAlignment="RIGHT" textOverrun="CLIP" wrapText="true">
<Label prefHeight="38.0" prefWidth="116.0" text="Digit group size: (only for display)" textAlignment="RIGHT" textOverrun="CLIP" wrapText="true">
<FlowPane.margin>
<Insets right="10.0" />
</FlowPane.margin>
@ -52,7 +52,7 @@
</FlowPane>
<FlowPane alignment="CENTER_LEFT" layoutX="244.0" layoutY="7.0" prefHeight="63.0" prefWidth="216.0">
<children>
<Label prefHeight="38.0" prefWidth="109.0" text="Message length:" textAlignment="RIGHT" textOverrun="CLIP">
<Label alignment="CENTER_RIGHT" prefHeight="38.0" prefWidth="109.0" text="Message length:" textAlignment="RIGHT" textOverrun="CLIP">
<FlowPane.margin>
<Insets right="10.0" />
</FlowPane.margin>

View File

@ -1,5 +1,12 @@
<html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Numbers Station Help</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Numbers Station Help</h1>
@ -10,16 +17,216 @@
<img src="overview.png"/>
<h2 class="caution">Caution</h2>
<p>
This application assumes you will be using your own encryption scheme where the encrypted messages are made up of digits 0-9. Typically these will be one-time pad messages such as described <a href="https://nathanmcrae.name/blog/practical-one-time-pad.html">here</a>. This application performs no encryption of it's own and should not be trusted with unencrypted messages.
</p>
<h2>Quick Start</h2>
<p>
Do it!
Before you start, you'll need to have a method of encrypting messages. Unencrypted messages should never be entered into the application. For a method to securely encrypt messages, see <a href="https://nathanmcrae.name/blog/practical-one-time-pad.html">here</a>.
</p>
<p>
For the sake of example, this will walk you through setting up a wordpress blog and creating a numbers station which will periodically post to it. There are also other options for uploading posts.
</p>
<h3>Start a Wordpress.com Blog</h3>
<p>
Wordpress is free blogging software, and one of the most popular at that. Many web hosts provide wordpress blogs for free and Wordpress.com is just one of those hosts, but that's the one we're going to use for this example since it's fairly straightforward.
</p>
<ol>
<li>
Go to <a href="https://wordpress.com/start/free">wordpress.com</a>
</li>
<li>
Create an account using whatever method you prefer
<ul>
<li>It will prompt you to search for a domain to rent, but you don't need one. To skip that, start a domain search and at the bottom select the 'Choose my domain later'</li>
</ul>
</li>
<li>
For 'What would you like to create?' at the bottom, press 'Skip to dashboard'
<ul>
<li>You should now have a basic wordpress site</li>
</ul>
</li>
<li>
You will need a password in order to allow the Numbers Station application to post for you. Go you your Wordpress.com account settings and under Security, set a password.
<ul>
<li>You may need to verify you email in order to post</li>
</ul>
</li>
</ol>
<h3>Set up a Numbers Station</h3>
<img src="station-settings.png"/>
<p>
Now that you have a blog to post to, you will need to set up your numbers station settings.
</p>
<ol>
<li>
<a href="https://git.nathanmcrae.name/nathanmcrae/numbers-station">Download</a>, install, and run the Numbers Station application
</li>
<li>
Select or create your desired station in the 'Select Station' dialog
</li>
<li>Open 'Station Settings'</li>
<li>Set connection information
<ol>
<li>
Choose the 'Wordpress option'
</li>
<li>
Enter your blog address (which can be found by selecting 'Visit Site' from the Wordpress.com dashboard) ending with <code>/xmlrpc.php</code>
<ul>
<li>So if your Wordpress.com site is <code>example.wordpress.com</code>, then the address to enter would be <code>https://example.wordpress.com/xmlrpc.php</code></li>
<li>Note that other wordpress instances may need XML-RPC to be enabled for this to work. Please see documentation for your instance.</li>
</ul>
</li>
<li>
Enter your Wordpress.com username (your email address if you registered with email) and password
<p class="caution">Your password is stored in your user files. Anyone with access to your user files would also be able to post to the blog</p>
</li>
<li>
Press the 'Test connection' button
</li>
</ol>
</li>
<li>
Set schedule
<ul>
<li>Your schedule will start at the given date and time, and will publish a message to the station on the given period (daily, weekly, monthly)</li>
</ul>
</li>
<li>
Set other options (See application reference for details)
</li>
<li>TODO: test post</li>
</ol>
<h3>
Set a message for delivery
</h3>
<p>
Once you save your station settings, the application should now run on the given schedule and upload messages. Each time it runs it will generate a random message to be sent next time. Whenever you would like to send a real message, all you need to do is replace the stored one with the real message.
</p>
<ol>
<li>
Open the application and select the station you want to send a message via
</li>
<li>
The main window will show the current message which will be sent next. To replace it, simply type in the real message (which should already be encrypted).
</li>
<li>
Press 'Set as next message'
</li>
</ol>
<p>
Now the real message is saved and will be sent at the next appointed time.
</p>
<h2>Motivation</h2>
<p>
Because it's fun
Suppose you have secret messages you are sending. Even if you are able to encrypt your messages perfectly, an adversary will still be able to tell <i>when</i> messages are sent which can reveal important information.
</p>
<p>
Suppose you are planning a protest and send many messages in the days leading up to the protest. For someone monitoring your communication, even if they don't know the content of the messages they can guess that you were somehow involved in the protest.
</p>
<p>
The solution to this problem is to send messages regularly. The messages can just be dummies most of the time, but then when you need to send a real message, an adversary won't be able to tell that anything is different.
</p>
<p>
This is the technique used by <a href="https://en.wikipedia.org/wiki/Numbers_station">numbers stations</a>, which are radio stations suspected to be run by governments to send messages to their spies abroad. The reason they are so mysterious is also the reason they are so effective: you have no idea if or when they are sending a real message.
</p>
<p>
--
The main requirement is that the messages which you do send are indistinguishable from random messages because otherwise an adversary could tell the real and fake messages apart.
</p>
<h2>Application Reference</h2>
<h3>Main Window</h3>
<img src="main-window-labelled.png"/>
<p>
The main window shows a label for the current station name (1) and a button to open the station selection window (2). The 'Settings' button (3) opens application settings, while the 'Station Settings' (5) button opens settings specific to the current selected station. The 'Help' button (4) should open this help document.
</p>
<p>
The message display area (6) shows the contents of the message which will be sent at the next scheduled time. This message can be edited, and then saved via (7).
</p>
<h3>Station Selection Window</h3>
<img src="station-selection-window.png"/>
<h3>Station Settings Window</h3>
The station name can be edited as well as group size used to break up messages for display.
Choosing the message length is important. You should aim to use a message length longer than the longest message you will send via the station. Ideally you should never have to adjust the message length after a station has started regular usage.
<h4>Upload Settings</h4>
<p class="caution">
The username an password entered here are stored unencrypted. Anyone with access to your computer account would be able to access the resources accessible via the credentials.
</p>
<p>
Currently two method of upload are supported: SFTP and wordpress.
</p>
<p>
SFTP uploads the file to the specified server as <code>www/message.txt</code>. It also generates an atom feed file and uploads it as <code>www/feed.xml</code> (subsequent runs will add to the feed file instead of overwriting it).
</p>
<p>
Wordpress will upload the message directly to the specified wordpress blog using XML-RPC. XML-RPC should be available on most wordpress installations, though it may need to be enabled.
</p>
<p>
Alternatively you can opt to run an external program to handle the message. The external program/script will recieve the path to message file as an argument. You could use this to run the message through a blog generator such as Pelican (Note that the external program will have to handle uploading the message as well).
</p>
<h4>Prefixes</h4>
<p>
Prefixes provide a way for the randomly generated messages to avoid using valid message identifiers. To do this, simply add message identifiers to the prefix list, dummy messages will subsequently be generated ensuring they don't start with the listed prefixes.
</p>
<p>
For background, one-time pad cypers typically use a message identifier as the first part of the message. This allows the recipient to determine which one-time pad to use for decryption. If a dummy message generated randomly accidentally starts with a valid message identifier, then the recipient might try to decrypt a nonsense message resulting in confusion.
</p>
<p>
The downside of storing the prefixes on the computer is that anyone with access to the computer (e.g. via malware) would be able to tell when a real message was sent (vs. otherwise they might only know <b>that</b> secret messages are likely being sent).
</p>
<p>
The alternative to providing prefixes is to use one-time pads with long enough message identifiers that the odds of a random message colliding with them is negligible.
</p>
<h4>Message Schedule</h4>
<p>
From the given start date and time, each station is run on the specified period. This means that it will upload the stored message according to the upload settings, then a new dummy message will be generated for the next time the station is run.
</p>
<p>
If the "Manage schedule externally" checkbox is ticked, then the Numbers Station application won't schedule the station to run. Instead, an external scheduler (e.g. Windows Task Scheduler, or cron for *nix systems) can be used. The station can be triggered by running <code>{numbers station executable} --station "{station name}"</code>. The application executable path can be found in the about screen.
</p>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

View File

@ -0,0 +1,46 @@
.caution {
background-color: #fff3cd;
border-color: #ffeeba;
color: #856404;
border: 1px solid transparent;
border-radius: 4px;
padding: 1rem;
margin: 20px 0;
}
.caution::before {
content: "⚠ ";
Cautio
margin-right: 8px;
}
body {
font-family: system-ui, -apple-system, sans-serif;
line-height: 1.6;
color: #333;
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
code {
background-color: #f5f5f5;
border-radius: 4px;
overflow-x: auto;
font-family: monospace;
margin: 20px 0;
}
h1, h2, h3 {
color: #222;
margin-bottom: 1rem;
}
img {
width: 100%;
max-width: 30em;
}
p {
margin-bottom: 1rem;
}