nonnil / TorCI

Web-based GUI for TorBox
GNU General Public License v3.0
22 stars 3 forks source link

installation instructions #3

Closed nyxnor closed 3 years ago

nyxnor commented 3 years ago

https://github.com/nonnil/TorCI#nimble

On debian 11, needs to install nim

sudo apt install nim -y

all good here:

dmin@debian:~/Documents/git/torci$ nimble build
  Verifying dependencies for torci@0.1.2
      Info: Dependency on jester@>= 0.5.0 already satisfied
  Verifying dependencies for jester@0.5.0
      Info: Dependency on httpbeast@>= 0.2.2 already satisfied
  Verifying dependencies for httpbeast@0.3.0
      Info: Dependency on https://github.com/iffy/asynctools@#pr_fix_for_latest already satisfied
  Verifying dependencies for asynctools@#pr_fix_for_latest
      Info: Dependency on https://github.com/timotheecour/asynctools@#pr_fix_compilation already satisfied
  Verifying dependencies for asynctools@#pr_fix_compilation
      Info: Dependency on karax@>= 1.2.1 already satisfied
  Verifying dependencies for karax@1.2.1
      Info: Dependency on ws@any version already satisfied
  Verifying dependencies for ws@0.4.4
      Info: Dependency on dotenv@any version already satisfied
  Verifying dependencies for dotenv@1.1.1
      Info: Dependency on sass@any version already satisfied
  Verifying dependencies for sass@0.1.0
      Info: Dependency on hmac@any version already satisfied
  Verifying dependencies for hmac@0.2.0
      Info: Dependency on nimSHA2@any version already satisfied
  Verifying dependencies for nimSHA2@0.1.1
      Info: Dependency on sha1@any version already satisfied
  Verifying dependencies for sha1@1.1
      Info: Dependency on nimcrypto@>= 0.5.4 already satisfied
  Verifying dependencies for nimcrypto@0.5.4
      Info: Dependency on libcurl@>= 1.0.0 already satisfied
  Verifying dependencies for libcurl@1.0.0
      Info: Dependency on nimpy@>= 0.1.1 already satisfied
  Verifying dependencies for nimpy@0.1.1
   Building torci/torci using c backend
/home/admin/Documents/git/torci/src/views/renderutils.nim(1, 13) Warning: imported and not used: 'vstyles' [UnusedImport]
/home/admin/Documents/git/torci/src/views/status.nim(2, 31) Warning: imported and not used: 'strformat' [UnusedImport]
/home/admin/Documents/git/torci/src/libs/syslib.nim(1, 33) Warning: imported and not used: 'sequtils' [UnusedImport]
/home/admin/Documents/git/torci/src/libs/hostAp.nim(1, 39) Warning: imported and not used: 'sequtils' [UnusedImport]
/home/admin/Documents/git/torci/src/libs/hostAp.nim(1, 59) Warning: imported and not used: 'strformat' [UnusedImport]
/home/admin/Documents/git/torci/src/connexion.nim(2, 56) Warning: imported and not used: 'sequtils' [UnusedImport]
/home/admin/Documents/git/torci/src/libs/wirelessManager.nim(4, 12) Warning: imported and not used: 'utils' [UnusedImport]
/home/admin/Documents/git/torci/src/views/network.nim(2, 8) Warning: imported and not used: 'jester' [UnusedImport]
/home/admin/Documents/git/torci/src/views/network.nim(5, 8) Warning: imported and not used: 'temp' [UnusedImport]
/home/admin/Documents/git/torci/src/libs/torboxLib.nim(4, 12) Warning: imported and not used: 'utils' [UnusedImport]
/home/admin/Documents/git/torci/src/libs/fallbacks.nim(1, 45) Warning: imported and not used: 'logging' [UnusedImport]
/home/admin/Documents/git/torci/src/routes/network.nim(4, 17) Warning: imported and not used: 'torLib' [UnusedImport]
/home/admin/Documents/git/torci/src/torci.nim(5, 23) Warning: imported and not used: 'logging' [UnusedImport]
/home/admin/Documents/git/torci/src/torci.nim(2, 13) Warning: imported and not used: 'renderutils' [UnusedImport]

later on failed:

admin@debian:~/Documents/git/torci$ nimble scss
  Executing task scss in /home/admin/Documents/git/torci/torci.nimble
Hint: used config file '/etc/nim/nim.cfg' [Conf]
Hint: used config file '/etc/nim/config.nims' [Conf]
Hint: used config file '/home/admin/Documents/git/torci/config.nims' [Conf]
Hint: 15337 lines; 0.032s; 13.336MiB peakmem; Debug build; proj: tools/gencss; out: /home/admin/.cache/nim/gencss_d/gencss [SuccessX]
Hint: /home/admin/.cache/nim/gencss_d/gencss  [Exec]
/home/admin/Documents/git/torci/tools/gencss.nim(7) gencss
/home/admin/.nimble/pkgs/sass-0.1.0/sass.nim(75) compileFile
/usr/lib/nim/system/io.nim(855) writeFile
Error: unhandled exception: cannot open: public/css/style.css [IOError]
Error: execution of an external program failed: '/home/admin/.cache/nim/gencss_d/gencss '
stack trace: (most recent call last)
/tmp/nimblecache-1428545878/nimscriptapi_275691389.nim(187, 16)
/home/admin/Documents/git/torci/torci.nimble(23, 8) scssTask
/usr/lib/nim/system/nimscript.nim(260, 7) exec
/usr/lib/nim/system/nimscript.nim(260, 7) Error: unhandled exception: FAILED: nim r tools/gencss [OSError]
     Error: Exception raised during nimble script execution
nonnil commented 3 years ago

Okay..., This was caused by the css directory not existing in public directory, and has been fixed. Also, I've added support for Dockerfile to make debugging easier.

nonnil commented 3 years ago

I've added a manual for building with Docker, if you'd like to read it. Instructions on how to install the Nim for each OS version will be added to the README later. But, TorCI will be released as a binary using cross-compilation, so there is no need to install the Nim in the production environment.

nyxnor commented 3 years ago

I am not a fan of installing binaries.

Just to facilitate for you -> how to install nim

Ok, tested with docker. image

nonnil commented 3 years ago

I am not a fan of installing binaries.

I agree, But i don't recommend doing nimble build in TorBox, because it will generate requests outside Tor.

Do you plan on signing the binaries?

Yes, I will support a file signature and hash check!