rofl0r / microsocks

tiny, portable SOCKS5 server with very moderate resource usage
Other
1.48k stars 266 forks source link

add systemd service file #69

Open evert-mouw opened 9 months ago

evert-mouw commented 9 months ago

e.g. this works for me on Debian

microsocks.service

[Unit]
Description=microsocks is a tiny SOCKS5 server
Documentation=https://github.com/rofl0r/microsocks
After=network.target auditd.service

[Service]
EnvironmentFile=/etc/microsocks.conf
ExecStart=/usr/bin/microsocks -u ${MICROSOCKS_LOGIN} -P ${MICROSOCKS_PASSW}

[Install]
WantedBy=multi-user.target

/etc/microsocks.conf

# used by the systemd service file
MICROSOCKS_LOGIN="foo"
MICROSOCKS_PASSW="bar"

It's a bit simple, and could be expanded by improving security (chroot, user=nobody, logging, whatever) but it just works.

rofl0r commented 9 months ago

that's cool but provision of service scripts has and will always be the responsibility of linux distros, not the software package itself. means i won't be adding this to the repo. i'll leave this open though so users can immediately see and copy/paste your script.

srd424 commented 9 months ago

Could go in a "docs/examples" directory?

On Fri, 15 Dec 2023, 10:06 rofl0r, @.***> wrote:

that's cool but provision of service scripts has and will always be the responsibility of linux distros, not the software package itself. means i won't be adding this to the repo. i'll leave this open though so users can immediately see and copy/paste your script.

— Reply to this email directly, view it on GitHub https://github.com/rofl0r/microsocks/issues/69#issuecomment-1857603520, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4TJUXAFINOA55OZOWH46DYJQOLLAVCNFSM6AAAAABAOT5V42VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJXGYYDGNJSGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

evert-mouw commented 9 months ago

TBH I'm not a huge fan of SystemD (although it has its uses) so I like software staying init neutral. But adding it to e.g. docs/examples as @srd424 suggested maybe makes more sense than leaving issues open? PS: Thanks for creating microsocks, it Just Works :-)