Initial Commit of cloudflared

This commit is contained in:
Michael Mainguy 2025-07-26 15:09:27 -05:00
parent 8ec80e038a
commit de5f14ad30
3 changed files with 74 additions and 5 deletions

42
.idea/workspace.xml generated
View File

@ -4,7 +4,11 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="dbf015c9-6bab-4a1d-a684-86aeb179d794" name="Changes" comment="Drop 5 initial commit." />
<list default="true" id="dbf015c9-6bab-4a1d-a684-86aeb179d794" name="Changes" comment="Initial Commit of cloudflared">
<change afterPath="$PROJECT_DIR$/SIDEQUESTS.md" afterDir="false" />
<change afterPath="$PROJECT_DIR$/gitea_files/etc/init.d/cloudflared" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@ -36,7 +40,7 @@
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;preferences.pluginManager&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;vcs.Git&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
}
}</component>
@ -57,7 +61,7 @@
<updated>1753029706563</updated>
<workItem from="1753029707902" duration="14900000" />
<workItem from="1753391066003" duration="37000" />
<workItem from="1753391114470" duration="1613000" />
<workItem from="1753391114470" duration="12233000" />
</task>
<task id="LOCAL-00001" summary="Updated to reflect current nodejs setup for container template.">
<option name="closed" value="true" />
@ -123,13 +127,34 @@
<option name="project" value="LOCAL" />
<updated>1753392726730</updated>
</task>
<option name="localTasksCounter" value="9" />
<task id="LOCAL-00009" summary="Drop 6 initial commit.">
<option name="closed" value="true" />
<created>1753392862840</created>
<option name="number" value="00009" />
<option name="presentableId" value="LOCAL-00009" />
<option name="project" value="LOCAL" />
<updated>1753392862840</updated>
</task>
<task id="LOCAL-00010" summary="Initial Commit of cloudflared">
<option name="closed" value="true" />
<created>1753557395257</created>
<option name="number" value="00010" />
<option name="presentableId" value="LOCAL-00010" />
<option name="project" value="LOCAL" />
<updated>1753557395257</updated>
</task>
<option name="localTasksCounter" value="11" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="OPEN_GENERIC_TABS">
<map>
<entry key="ee1f0cde-2158-4e85-8ed2-3ca0b234aa80" value="TOOL_WINDOW" />
</map>
</option>
<option name="TAB_STATES">
<map>
<entry key="MAIN">
@ -137,6 +162,11 @@
<State />
</value>
</entry>
<entry key="ee1f0cde-2158-4e85-8ed2-3ca0b234aa80">
<value>
<State />
</value>
</entry>
</map>
</option>
</component>
@ -149,6 +179,8 @@
<MESSAGE value="started outline for future." />
<MESSAGE value="Added drop 4" />
<MESSAGE value="Drop 5 initial commit." />
<option name="LAST_COMMIT_MESSAGE" value="Drop 5 initial commit." />
<MESSAGE value="Drop 6 initial commit." />
<MESSAGE value="Initial Commit of cloudflared" />
<option name="LAST_COMMIT_MESSAGE" value="Initial Commit of cloudflared" />
</component>
</project>

13
SIDEQUESTS.md Normal file
View File

@ -0,0 +1,13 @@
# "The Cloud"
- DNS/DHCP
- Service Discovery
- Routing
- CDN
- Edge compute
# Reliability
- Fail Open
- Split Brain
# Notes
- Firewalling Home Versus Work
-

View File

@ -0,0 +1,24 @@
#!/sbin/openrc-run
name=${RC_SVCNAME}
source /etc/conf.d/${name}
cmd="/usr/bin/cloudflared --pidfile /var/run/${name}.pid --autoupdate-freq 24h0m0s tunnel run --token $CLOUDFLARED_TUNNEL_TOKEN"
pid_file="/var/run/${name}.pid"
stdout_log="/var/log/$name.log"
stderr_log="/var/log/$name.err"
command_background="yes"
depend() {
need net
need gitea
}
start() {
$cmd >> "$stdout_log" 2>> "$stderr_log" &
echo $! > "$pid_file"
}
stop() {
if [ -f "$pid_file" ]; then
kill $(cat "$pid_file")
rm -f "$pid_file"
fi
}