mirror of https://github.com/oxen-io/lokinet
warn windows user if using untested relay mode
update readme
This commit is contained in:
parent
49cd5dfaa6
commit
0eacab7759
|
@ -1,50 +0,0 @@
|
|||
# lokinet builder for windows
|
||||
|
||||
## Building for Windows (mingw-w64 native, or wow64/linux/unix cross-compiler)
|
||||
|
||||
#i686 or x86_64
|
||||
|
||||
$ pacman -Sy base-devel mingw-w64-$ARCH-toolchain git libtool autoconf cmake (or your distro/OS package mgr)
|
||||
$ git clone https://github.com/loki-project/loki-network.git
|
||||
$ cd loki-network
|
||||
$ mkdir -p build; cd build
|
||||
$ cmake .. -DCMAKE_BUILD_TYPE=Debug -DSTATIC_LINK=ON -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DDNS_PORT=53
|
||||
|
||||
# if cross-compiling do
|
||||
$ mkdir -p build; cd build
|
||||
$ export COMPILER=clang # if using clang for windows
|
||||
$ cmake .. -DCMAKE_BUILD_TYPE=[Debug|Release] -DSTATIC_LINK=ON -DCMAKE_CROSSCOMPILING=ON -DCMAKE_C_COMPILER=$ARCH-w64-mingw32-[gcc|clang] -DCMAKE_CXX_COMPILER=$ARCH-w64-mingw32-[g|clang]++ -DDNS_PORT=53 -DCMAKE_TOOLCHAIN_FILE=../contrib/cross/mingw[32].cmake
|
||||
|
||||
## running
|
||||
|
||||
if the machine you run lokinet on has a public address (at the moment) it `will` automatically become a relay,
|
||||
otherwise it will run in client mode.
|
||||
|
||||
|
||||
**NEVER** run lokinet with elevated privileges.
|
||||
|
||||
to set up a lokinet to start on boot:
|
||||
|
||||
C:\> (not ready yet. TODO: write up some SCM install code in the win32 setup)
|
||||
|
||||
alternatively:
|
||||
|
||||
set up the configs and bootstrap (first time only):
|
||||
|
||||
C:\> lokinet -g && lokinet-bootstrap
|
||||
|
||||
run it (foreground):
|
||||
|
||||
C:\> lokinet
|
||||
|
||||
to force client mode edit `$APPDATA/.lokinet/daemon.ini`
|
||||
|
||||
comment out the `[bind]` section, so it looks like this:
|
||||
|
||||
...
|
||||
|
||||
# [bind]
|
||||
# {B7F2ECAC-BB10-4736-8BBD-6E9444E27030}=1090
|
||||
|
||||
|
||||
-despair
|
|
@ -83,10 +83,9 @@ main(int argc, char *argv[])
|
|||
break;
|
||||
case 'r':
|
||||
#ifdef _WIN32
|
||||
llarp::LogError(
|
||||
llarp::LogWarn(
|
||||
"please don't try this at home, the relay feature is untested on "
|
||||
"windows server --R.");
|
||||
return 1;
|
||||
#endif
|
||||
asRouter = true;
|
||||
break;
|
||||
|
|
38
readme.md
38
readme.md
|
@ -43,9 +43,30 @@ build:
|
|||
install (root):
|
||||
|
||||
# gmake install
|
||||
|
||||
|
||||
## Running
|
||||
## Windows
|
||||
|
||||
build:
|
||||
|
||||
$ pacman -Sy base-devel mingw-w64-$ARCH-toolchain git libtool autoconf cmake
|
||||
$ git clone https://github.com/loki-project/loki-network.git
|
||||
$ cd loki-network
|
||||
$ mkdir -p build; cd build
|
||||
$ cmake .. -DCMAKE_BUILD_TYPE=[Debug|Release] -DSTATIC_LINK=ON -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DDNS_PORT=53 -G 'Unix Makefiles'
|
||||
|
||||
install (elevated) to `$PROGRAMFILES/lokinet` or `$ProgramFiles(x86)/lokinet`:
|
||||
|
||||
$ make install
|
||||
|
||||
if cross-compiling, install mingw-w64 from your distro's package manager, or [build from source](https://sourceforge.net/p/mingw-w64/wiki2/Cross%20Win32%20and%20Win64%20compiler/), then:
|
||||
|
||||
$ mkdir -p build; cd build
|
||||
$ export COMPILER=clang # if using clang for windows
|
||||
$ cmake .. -DCMAKE_BUILD_TYPE=[Debug|Release] -DSTATIC_LINK=ON -DCMAKE_CROSSCOMPILING=ON -DDNS_PORT=53 -DCMAKE_TOOLCHAIN_FILE=../contrib/cross/mingw[32].cmake
|
||||
|
||||
this will create a static binary that can be installed anywhere, with no other dependency other than libc (7.0)
|
||||
|
||||
## Running on Linux/UNIX/BSD
|
||||
|
||||
**DO NOT RUN AS ROOT**, run as normal user.
|
||||
|
||||
|
@ -61,6 +82,19 @@ to run as relay:
|
|||
$ lokinet-bootstrap
|
||||
$ lokinet
|
||||
|
||||
|
||||
## Running on Windows
|
||||
|
||||
**DO NOT RUN AS ELEVATED USER**, run as normal user.
|
||||
|
||||
to run as client:
|
||||
|
||||
C:\>lokinet -g && lokinet-bootstrap && lokinet
|
||||
|
||||
to run as relay (highly experimental, currently unsupported!):
|
||||
|
||||
C:\>lokinet -r -g && lokinet-bootstrap && lokinet
|
||||
|
||||
## Usage
|
||||
|
||||
see the [documentation](https://loki-project.github.io/loki-docs/Lokinet/LokinetOverview/) on how to get started.
|
||||
|
|
Loading…
Reference in New Issue