added -insecure_tls
This commit is contained in:
parent
ea29af0e89
commit
e9c8689f8d
|
@ -169,6 +169,9 @@ static CURL *Link_to_curl(Link *link)
|
||||||
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 15);
|
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 15);
|
||||||
curl_easy_setopt(curl, CURLOPT_SHARE, CURL_SHARE);
|
curl_easy_setopt(curl, CURLOPT_SHARE, CURL_SHARE);
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_memory_callback);
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_memory_callback);
|
||||||
|
if (CONFIG.insecure_tls) {
|
||||||
|
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
|
||||||
|
}
|
||||||
|
|
||||||
// curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
// curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||||
|
|
||||||
|
|
|
@ -154,6 +154,7 @@ parse_arg_list(int argc, char **argv, char ***fuse_argv, int *fuse_argc)
|
||||||
{"sonic-id3", no_argument, NULL, 'L'}, /* 17 */
|
{"sonic-id3", no_argument, NULL, 'L'}, /* 17 */
|
||||||
{"no-range-check", no_argument, NULL, 'L'}, /* 18 */
|
{"no-range-check", no_argument, NULL, 'L'}, /* 18 */
|
||||||
{"sonic-insecure", no_argument, NULL, 'L'}, /* 19 */
|
{"sonic-insecure", no_argument, NULL, 'L'}, /* 19 */
|
||||||
|
{"insecure-tls", no_argument, NULL, 'L'}, /* 20 */
|
||||||
{0, 0, 0, 0}
|
{0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
while ((c =
|
while ((c =
|
||||||
|
@ -236,6 +237,9 @@ parse_arg_list(int argc, char **argv, char ***fuse_argv, int *fuse_argc)
|
||||||
case 19:
|
case 19:
|
||||||
CONFIG.sonic_insecure = 1;
|
CONFIG.sonic_insecure = 1;
|
||||||
break;
|
break;
|
||||||
|
case 20:
|
||||||
|
CONFIG.insecure_tls = 1;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "see httpdirfs -h for usage\n");
|
fprintf(stderr, "see httpdirfs -h for usage\n");
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -310,6 +314,8 @@ HTTPDirFS options:\n\
|
||||||
--user-agent Set user agent string (default: \"HTTPDirFS\")\n\
|
--user-agent Set user agent string (default: \"HTTPDirFS\")\n\
|
||||||
--no-range-check Disable the build-in check for the server's support\n\
|
--no-range-check Disable the build-in check for the server's support\n\
|
||||||
for HTTP range requests\n\
|
for HTTP range requests\n\
|
||||||
|
--insecure_tls Disable licurl TLS certificate verification by\n\
|
||||||
|
setting CURLOPT_SSL_VERIFYHOST to 0\n\
|
||||||
\n\
|
\n\
|
||||||
For mounting a Airsonic / Subsonic server:\n\
|
For mounting a Airsonic / Subsonic server:\n\
|
||||||
--sonic-username The username for your Airsonic / Subsonic server\n\
|
--sonic-username The username for your Airsonic / Subsonic server\n\
|
||||||
|
|
|
@ -74,6 +74,8 @@ void Config_init(void)
|
||||||
|
|
||||||
CONFIG.no_range_check = 0;
|
CONFIG.no_range_check = 0;
|
||||||
|
|
||||||
|
CONFIG.insecure_tls = 0;
|
||||||
|
|
||||||
/*--------------- Cache related ---------------*/
|
/*--------------- Cache related ---------------*/
|
||||||
CONFIG.cache_enabled = 0;
|
CONFIG.cache_enabled = 0;
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,8 @@ typedef struct {
|
||||||
int http_wait_sec;
|
int http_wait_sec;
|
||||||
/** \brief Disable check for the server's support of HTTP range request */
|
/** \brief Disable check for the server's support of HTTP range request */
|
||||||
int no_range_check;
|
int no_range_check;
|
||||||
|
/** \brief Disable TLS certificate verification */
|
||||||
|
int insecure_tls;
|
||||||
|
|
||||||
/** \brief Whether cache mode is enabled */
|
/** \brief Whether cache mode is enabled */
|
||||||
int cache_enabled;
|
int cache_enabled;
|
||||||
|
|
Loading…
Reference in New Issue