💾 Archived View for gemini.rmf-dev.com › repo › Vaati › rxproxy › files › b393f94da2bd3f689fd8598d0c… captured on 2023-01-29 at 16:05:21. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-07-16)

➡️ Next capture (2023-03-20)

🚧 View Differences

-=-=-=-=-=-=-

0 /* See LICENSE file for copyright and license details. */

1 import std.stdio;

2 import proxy;

3 import std.concurrency;

4 import core.thread;

5 import std.file;

6 import logger;

7

8 void main()

9 {

10 string config = "/etc/rxproxy";

11 version(Windows) {

12 config = ".";

13 }

14 version(FreeBSD) {

15 config = "/usr/local/etc/rxproxy";

16 }

17

18 try {

19 isDir(config);

20 } catch(FileException) {

21 try {

22 mkdir(config);

23 } catch(FileException) {

24 Logger.error("Failed to create config folder");

25 }

26 }

27 Proxy server = new Proxy();

28 server.initialize(config~"/config.json");

29 server.listen();

30 }

31