Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Benjamin Allred
crown-core
Commits
1c750dbd
Commit
1c750dbd
authored
10 years ago
by
Philip Kaufmann
Browse files
Options
Download
Email Patches
Plain Diff
remove -tor compatibility code (only allow -onion)
- exit, if -tor option is found and give error to user
parent
36db6633
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/init.cpp
+7
-8
src/init.cpp
with
7 additions
and
8 deletions
+7
-8
src/init.cpp
View file @
1c750dbd
...
...
@@ -560,6 +560,9 @@ bool AppInit2(boost::thread_group& threadGroup)
// Check for -debugnet (deprecated)
if
(
GetBoolArg
(
"-debugnet"
,
false
))
InitWarning
(
_
(
"Warning: Deprecated argument -debugnet ignored, use -debug=net"
));
// Check for -tor - as this is a privacy risk to continue, exit here
if
(
GetBoolArg
(
"-tor"
,
false
))
return
InitError
(
_
(
"Error: Unsupported argument -tor found, use -onion."
));
fBenchmark
=
GetBoolArg
(
"-benchmark"
,
false
);
// Checkmempool defaults to true in regtest mode
...
...
@@ -766,19 +769,15 @@ bool AppInit2(boost::thread_group& threadGroup)
}
// -onion can override normal proxy, -noonion disables tor entirely
// -tor here is a temporary backwards compatibility measure
if (mapArgs.count("-tor"))
printf("Notice: option -tor has been replaced with -onion and will be removed in a later version.\n");
if
(
!
(
mapArgs
.
count
(
"-onion"
)
&&
mapArgs
[
"-onion"
]
==
"0"
)
&&
!(mapArgs.count("-tor") && mapArgs["-tor"] == "0") &&
(fProxy || mapArgs.count("-onion") || mapArgs.count("-tor"))) {
(
fProxy
||
mapArgs
.
count
(
"-onion"
)))
{
CService
addrOnion
;
if (!mapArgs.count("-onion")
&& !mapArgs.count("-tor")
)
if
(
!
mapArgs
.
count
(
"-onion"
))
addrOnion
=
addrProxy
;
else
addrOnion =
mapArgs.count("-onion")?CService(mapArgs["-onion"], 9050):CService(mapArgs["-tor
"], 9050);
addrOnion
=
CService
(
mapArgs
[
"-onion
"
],
9050
);
if
(
!
addrOnion
.
IsValid
())
return InitError(strprintf(_("Invalid -onion address: '%s'"), mapArgs
.count("-onion")?mapArgs["-onion"]:mapArgs["-tor
"]));
return
InitError
(
strprintf
(
_
(
"Invalid -onion address: '%s'"
),
mapArgs
[
"-onion
"
]));
SetProxy
(
NET_TOR
,
addrOnion
,
5
);
SetReachable
(
NET_TOR
);
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help