-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated according to v2.4.0 #8
Open
albertony
wants to merge
2
commits into
debauchee:master
Choose a base branch
from
albertony:v_2_4_0_updates
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,12 +64,14 @@ This will only effect command prompts opened after the change. | |
|
||
The command line version of Barrier is a single client executable `barrierc.exe` | ||
and a single server executable `barriers.exe`. They both have a dependency to OpenSSL | ||
libraries, `libeay32.dll` and `ssleay32.dll` (used for encryption with argument | ||
`--enable-crypto`), as well as Microsoft Visual C++ runtime libraries. | ||
libraries, `libeay32.dll` and `ssleay32.dll` (used for encryption, unless argument | ||
`--disable-crypto`), as well as Microsoft Visual C++ runtime libraries. | ||
|
||
From an existing installation you can copy the necessary program files to | ||
a location of choice, to get a command line only portable (depending on configuration) | ||
installation. Copy the following files from the installation directory `C:\Program Files\Barrier`: | ||
installation. It is also possible to extract the files directly from the installer | ||
by using the tool [innounp](http://innounp.sourceforge.net/). | ||
Copy the following files from the installation directory `C:\Program Files\Barrier`: | ||
|
||
``` | ||
barrierc.exe | ||
|
@@ -78,22 +80,18 @@ libeay32.dll | |
ssleay32.dll | ||
``` | ||
|
||
To be able to generate server certificate, you can also choose to include the OpenSSL | ||
application itself (on the server), together with Barrier's predefined OpenSSL | ||
configuration file: | ||
As long as you have the | ||
[Microsoft Visual C++ Redistributable for Visual Studio 2019](https://visualstudio.microsoft.com/downloads/) | ||
installed (or copy the necessary runtime libaries `msvcp140.dll`, `vcruntime140.dll` and | ||
`vcruntime140_1.dll` into the application directory), you will now have a stand-alone | ||
application directory that you can manually copy into computers where you need it. | ||
|
||
``` | ||
openssl.exe | ||
barrier.conf | ||
``` | ||
|
||
As long as you have the [Microsoft Visual C++ Redistributable for Visual Studio 2019](https://visualstudio.microsoft.com/downloads/) installed (or copy the necessary runtime libaries | ||
`msvcp140.dll`, `vcruntime140.dll` and `vcruntime140_1.dll` into the application directory), | ||
you will now have a stand-alone application directory that you can manually copy into computers | ||
where you need it. | ||
To be able to generate server certificate used for encryption, you may need a separate | ||
OpenSSL installation (on the server). | ||
|
||
For a completely portable installation, with local configuration, you must configure the | ||
location of server configuration file and SSL/TLS configuration files. See [Text File Configuration](#text_config), [Server Command Line Options](#server_cli), | ||
location of server configuration file and SSL/TLS configuration files. See | ||
[Text File Configuration](#text_config), [Server Command Line Options](#server_cli), | ||
[Client Command Line Options](#client_cli) and [SSL/TLS Configuration](#ssl_config), below. | ||
|
||
<a href="#top">Back to top</a> | ||
|
@@ -164,8 +162,10 @@ Options: | |
-l --log <file> write log messages to file. | ||
--no-tray disable the system tray icon. | ||
--enable-drag-drop enable file drag & drop. | ||
--enable-crypto enable the crypto (ssl) plugin. | ||
--enable-crypto enable the crypto (ssl) plugin (default, deprecated). | ||
--disable-crypto disable the crypto (ssl) plugin. | ||
--profile-dir <path> use named profile directory instead. | ||
--drop-dir <path> use named drop target directory instead. | ||
-f, --no-daemon run in the foreground. | ||
``` | ||
|
||
|
@@ -193,8 +193,10 @@ Options: | |
-l --log <file> write log messages to file. | ||
--no-tray disable the system tray icon. | ||
--enable-drag-drop enable file drag & drop. | ||
--enable-crypto enable the crypto (ssl) plugin. | ||
--enable-crypto enable the crypto (ssl) plugin (default, deprecated). | ||
--disable-crypto disable the crypto (ssl) plugin. | ||
--profile-dir <path> use named profile directory instead. | ||
--drop-dir <path> use named drop target directory instead. | ||
-f, --no-daemon run in the foreground. | ||
--daemon run as a daemon. (*) | ||
``` | ||
|
@@ -552,8 +554,8 @@ sections, `[General]` and `[internalConfig]`. | |
## <a name="ssl_config">SSL/TLS Configuration</a> | ||
|
||
Barrier supports SSL/TLS encryption, by use of the `OpenSSL` library (included). | ||
This must be anabled with command line argument `--enable-crypto`, and requires a | ||
certificate and fingerprint to be configured. | ||
Starting with version 2.4.0 this is enabled by default, but requires a certificate | ||
and fingerprint. | ||
|
||
The SSL related configuration is kept in subdirectory "SSL" in the same user specific location | ||
as the [text file configuration](#text_config) is loaded from: By default | ||
|
@@ -568,7 +570,8 @@ connection. A server's fingerprint must be generated from the certificate, and m | |
in file `SSL/Fingerprints/Local.txt` on the server. All clients must have the fingerprint | ||
hash string of trusted servers in a file `SSL/Fingerprints/TrustedServers.txt`. | ||
When connecting to a server, if it presents a fingerprint not explicitely trusted by the client, | ||
it will refuse the connection. See also [Fingerprint trust troubleshooting](https://github.com/debauchee/barrier/wiki/Troubleshooting#fingerprint-trust). | ||
it will refuse the connection. See also | ||
[Fingerprint trust troubleshooting](https://github.com/debauchee/barrier/wiki/Troubleshooting#fingerprint-trust). | ||
|
||
The server will therefore typically contain the following files: | ||
``` | ||
|
@@ -586,35 +589,31 @@ Clients must contain the following file: | |
The main UI application has built-in functionality for handling encryption. | ||
In server mode it will generate a self-signed server certificate and a fingerprint. | ||
In client mode it will prompt for you to accept the server's fingerprint, and add | ||
it to your list of trusted servers. | ||
In a command line only ([portable](#portable)) environment you will have to handle | ||
this manually. You can use the OpenSSL command line utility which is included in | ||
a Barrier installation together with a Barrier specific OpenSSL configuration | ||
file `barrier.conf`. To create them the same way as the UI application does, | ||
you can follow the following Windows example. It uses `openssl.exe` and `barrier.conf` | ||
from a Barrier installed in default location `C:\Program Files\Barrier`, generating | ||
configuration in default location `%LocalAppData%\Barrier\SSL`. If you have the | ||
OpenSSL files in a different location and/or are planning to keep the SSL files in | ||
a custom location specified with command line argument `--profile-dir`, you must | ||
change the paths in the example accordingly. | ||
it to your list of trusted servers. In a command line only ([portable](#portable)) | ||
environment you will have to handle this manually. | ||
|
||
To manually create the certificate and fingerprint similar to how the UI application does | ||
it, you can follow the Windows example below. It creates them in the default location | ||
`%LocalAppData%\Barrier\SSL`. If you have the are planning to keep the SSL files in a | ||
custom location specified with command line argument `--profile-dir`, you must change | ||
the paths in the example accordingly. It also requires an OpenSSL installation, | ||
e.g installer from [http://slproweb.com/products/Win32OpenSSL.html] installed into | ||
default location `C:\Program Files\OpenSSL-Win64`. | ||
|
||
``` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we use the |
||
MKDIR "%LocalAppData%\Barrier\SSL\Fingerprints" >NUL 2>&1 | ||
SET OPENSSL_CONF=C:\Program Files\Barrier\barrier.conf | ||
SET RANDFILE=%LocalAppData%\Barrier\SSL\.rnd | ||
"C:\Program Files\Barrier\openssl.exe" req -x509 -nodes -days 365 -subj /CN=Barrier -newkey rsa:2048 -keyout "%LocalAppData%\Barrier\SSL\Barrier.pem" -out "%LocalAppData%\Barrier\SSL\Barrier.pem" | ||
IF EXIST "%RANDFILE%" DEL "%RANDFILE%" | ||
FOR /F "tokens=2 delims=^=" %a in ('""C:\Program Files\Barrier\openssl.exe" x509 -fingerprint -sha1 -noout -in "%LocalAppData%\Barrier\SSL\Barrier.pem""') DO ECHO %a > "%LocalAppData%\Barrier\SSL\Fingerprints\Local.txt" | ||
"C:\Program Files\OpenSSL-Win64\bin\openssl.exe" req -config "C:\Program Files\OpenSSL-Win64\bin\openssl.cfg" -x509 -nodes -days 365 -subj /CN=Barrier -newkey rsa:2048 -keyout "%LocalAppData%\Barrier\SSL\Barrier.pem" -out "%LocalAppData%\Barrier\SSL\Barrier.pem" | ||
FOR /F "tokens=2 delims=^=" %%a in ('""C:\Program Files\OpenSSL-Win64\bin\openssl.exe" x509 -fingerprint -sha256 -noout -in "%LocalAppData%\Barrier\SSL\Barrier.pem""') DO ECHO v2:sha256:%a > "%LocalAppData%\Barrier\SSL\Fingerprints\Local.txt" | ||
``` | ||
|
||
Now, on any clients you must manually ensure there is a text file | ||
`%LocalAppData%\Barrier\SSL\Fingerprints\TrustedServers.txt`, | ||
and append a line to it, with the hash string from the server's | ||
`%LocalAppData%\Barrier\SSL\Fingerprints\Local.txt`, | ||
and append the line from the text file | ||
`%LocalAppData%\Barrier\SSL\Fingerprints\Local.txt` on server, | ||
e.g. | ||
|
||
``` | ||
96:32:AB:DD:38:5C:E5:21:20:8E:52:E8:83:28:A0:2A:CC:CC:8F:A3 | ||
v2:sha256:92:D0:AB:DD:38:5C:E5:21:20:8E:52:E8:83:28:A0:2A:CC:CC:8F:A3:70:41:9B:A6:D7:98:9C:ED:50:3F:D7:FE | ||
``` | ||
|
||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.