<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dpibreak.git/src/opt.rs, branch v0.5.1</title>
<subtitle>System-wide DPI circumvention with minimal configuration
</subtitle>
<id>http://git.dilluti0n.com/dpibreak.git/atom?h=v0.5.1</id>
<link rel='self' href='http://git.dilluti0n.com/dpibreak.git/atom?h=v0.5.1'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/dpibreak.git/'/>
<updated>2026-03-01T15:25:37Z</updated>
<entry>
<title>log: add debug!/info!/warn!/error! macros and refactor to use it</title>
<updated>2026-03-01T15:25:37Z</updated>
<author>
<name>dilluti0n</name>
<email>hskimse1@gmail.com</email>
</author>
<published>2026-03-01T15:22:51Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/dpibreak.git/commit/?id=4699bf9afd69d9f2323b1fc0f6abba7aaac23cc2'/>
<id>urn:sha1:4699bf9afd69d9f2323b1fc0f6abba7aaac23cc2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>opt: decouple set_opt() from logging</title>
<updated>2026-02-15T17:52:03Z</updated>
<author>
<name>dilluti0n</name>
<email>hskimse1@gmail.com</email>
</author>
<published>2026-02-15T17:49:49Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/dpibreak.git/commit/?id=b68753e878c440f1a11aa89f1f359764f1609734'/>
<id>urn:sha1:b68753e878c440f1a11aa89f1f359764f1609734</id>
<content type='text'>
set_opt() was logging each option as it set them, which created a
tight coupling between option initialization and log output timing.
This was particularly problematic for daemon mode: daemonize must
happen after set_opt() (to know whether -D was passed) but before
logging (so output goes to the log file, not stdout).

Split into set_opt() -&gt; InitializedOpts and InitializedOpts::log(),
using a typestate pattern to enforce at compile time that log() cannot
be called before set_opt(). This lets each platform's bootstrap()
handle daemonization between the two steps:

    let initialized = opt.set_opt()?;
    platform::bootstrap()?;   // daemonize here if needed
    initialized.log();        // now safe to log

Also:
- Move daemonize_1() into platform::bootstrap() on both platforms
- Make daemonize_1() / service_main() private to their platform modules
- Fix the long-standing TODO about using log_println in daemonize()
</content>
</entry>
<entry>
<title>Consolidate setup logic into run()</title>
<updated>2026-02-15T13:04:25Z</updated>
<author>
<name>dilluti0n</name>
<email>hskimse1@gmail.com</email>
</author>
<published>2026-02-15T13:01:43Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/dpibreak.git/commit/?id=3cb2c192454964c2ae01e196eaa7fdd6434efeb5'/>
<id>urn:sha1:3cb2c192454964c2ae01e196eaa7fdd6434efeb5</id>
<content type='text'>
The bootstrap/run separation was unnecessary. Move all initialization
(cleanup + nftables setup): into run() and skip bootstrap in daemon
mode. We repurpose the bootstrap() function to only run in non-daemon
mode for future foreground-only initialization.

- Add OPT_DAEMON option to detect daemon mode
- Move cleanup() and install_rules() from bootstrap() to run()
- Make bootstrap() a no-op (only called in non-daemon mode)
</content>
</entry>
<entry>
<title>opt: refactor to detach parse_args and set_opt</title>
<updated>2026-02-15T06:59:26Z</updated>
<author>
<name>dilluti0n</name>
<email>hskimse1@gmail.com</email>
</author>
<published>2026-02-15T02:56:34Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/dpibreak.git/commit/?id=40fc4485e56414ab379b2332a9994a23af16eb3f'/>
<id>urn:sha1:40fc4485e56414ab379b2332a9994a23af16eb3f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>linux: implement daemonize</title>
<updated>2026-02-15T06:59:16Z</updated>
<author>
<name>dilluti0n</name>
<email>hskimse1@gmail.com</email>
</author>
<published>2026-02-14T16:09:03Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/dpibreak.git/commit/?id=389f9bf2b021104072377420c0c6c115542da652'/>
<id>urn:sha1:389f9bf2b021104072377420c0c6c115542da652</id>
<content type='text'>
Closes: #2
Link: https://github.com/dilluti0n/dpibreak/issues/2
</content>
</entry>
<entry>
<title>opt: add option -D, --daemon</title>
<updated>2026-02-14T13:19:14Z</updated>
<author>
<name>dilluti0n</name>
<email>hskimse1@gmail.com</email>
</author>
<published>2026-02-14T12:45:51Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/dpibreak.git/commit/?id=a200ae9e7915b8eaab1a1b0975d5ecd34978f81a'/>
<id>urn:sha1:a200ae9e7915b8eaab1a1b0975d5ecd34978f81a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>opt: add implicit dependancy between --fake-* and --fake</title>
<updated>2026-01-31T14:52:02Z</updated>
<author>
<name>dilluti0n</name>
<email>hskimse1@gmail.com</email>
</author>
<published>2026-01-31T14:49:44Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/dpibreak.git/commit/?id=744f3a65e46aaf2954cd761aef7f6deab8150679'/>
<id>urn:sha1:744f3a65e46aaf2954cd761aef7f6deab8150679</id>
<content type='text'>
Now --fake-* options implicitly turn on --fake option.
</content>
</entry>
<entry>
<title>opt: add option --fake-autottl</title>
<updated>2026-01-23T06:55:09Z</updated>
<author>
<name>dilluti0n</name>
<email>hskimse1@gmail.com</email>
</author>
<published>2026-01-20T04:31:03Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/dpibreak.git/commit/?id=ba9b3f4555ecadebd876379d23d892cfd43391aa'/>
<id>urn:sha1:ba9b3f4555ecadebd876379d23d892cfd43391aa</id>
<content type='text'>
</content>
</entry>
<entry>
<title>opt: change default release log level to Warning as expected</title>
<updated>2026-01-16T11:19:13Z</updated>
<author>
<name>dilluti0n</name>
<email>hskimse1@gmail.com</email>
</author>
<published>2026-01-16T11:19:13Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/dpibreak.git/commit/?id=0315e40c2f056b9d7b047c14c2fa5a64649dce75'/>
<id>urn:sha1:0315e40c2f056b9d7b047c14c2fa5a64649dce75</id>
<content type='text'>
</content>
</entry>
<entry>
<title>opt: deprecate `--loglevel` in favor of `--log-level`</title>
<updated>2026-01-16T09:12:30Z</updated>
<author>
<name>dilluti0n</name>
<email>hskimse1@gmail.com</email>
</author>
<published>2026-01-16T09:08:46Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/dpibreak.git/commit/?id=41085084741bd59ebfc9feb24e100d13705627f4'/>
<id>urn:sha1:41085084741bd59ebfc9feb24e100d13705627f4</id>
<content type='text'>
</content>
</entry>
</feed>
