-
-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: config files are now tied to tox data files by default
Instead of using the same default config file for every profile we now use the same name and path as the custom tox profile (with a .conf file extension), and create an empty config file if it doesn't already exist. In addition, if the user passes a non-existent file as a run option, we now create an empty file instead of returning an error. Behaviour should not be changed for default profiles.
- Loading branch information
Showing
8 changed files
with
147 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* run_options.h | ||
* | ||
* | ||
* Copyright (C) 2024 Toxic All Rights Reserved. | ||
* | ||
* This file is part of Toxic. | ||
* | ||
* Toxic is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Toxic is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with Toxic. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
|
||
#ifndef RUN_OPTIONS_H | ||
|
||
#include <stdbool.h> | ||
#include <stdio.h> // needed for FILE | ||
#include <stdint.h> | ||
|
||
#include "toxic_constants.h" | ||
|
||
typedef struct Run_Options { | ||
bool use_ipv4; | ||
bool force_tcp; | ||
bool disable_local_discovery; | ||
bool debug; | ||
bool default_locale; | ||
bool use_custom_data; | ||
bool use_custom_config_file; | ||
bool no_connect; | ||
bool encrypt_data; | ||
bool unencrypt_data; | ||
|
||
char nameserver_path[MAX_STR_SIZE]; | ||
char config_path[MAX_STR_SIZE]; | ||
char nodes_path[MAX_STR_SIZE]; | ||
|
||
bool logging; | ||
FILE *log_fp; | ||
|
||
char proxy_address[256]; | ||
uint8_t proxy_type; | ||
uint16_t proxy_port; | ||
|
||
uint16_t tcp_port; | ||
} Run_Options; | ||
|
||
#endif /* RUN_OPTIONS_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.