Giter Club home page Giter Club logo

cruster's Introduction

Cruster

v0.7.2

Intercepting HTTP(S)/WS(S) proxy for penetration tests' and DevSecOps purposes. Inspired by Burp Suite, OWASP ZAP, Mitmproxy and Nuclei. Hope it could be as useful as them.

Cruster is highly under development for now. Unfortuantely, I have not got enough free time to develop it faster.

cruster

What Cruster can do

  • Proxy HTTP;
  • Proxy WebSocket;
  • Interactive text interface:
    • Table visualization of HTTP messgages went through proxy;
    • Requests/Responses highlighted visualization;
    • Filtering content;
    • Manual requests repeater;
  • Dump mode (-d) with controlable verbosity;
  • CLI, which is comparable with TUI;
  • Process requests/responses basing on scope (-I, -E);
  • Storing/Loading proxy data on/from drive;
  • ... Coming soon...

Usage

There are three ways you can use Cruster: with interactive text interface, in dump mode (logging) and as CLI tool.

To start, just run cruster and it will create working directory in ~/.cruster, putting there base config, TLS certificate with key. Then it will be listening to requests on address 127.0.0.1:8080.

To use this proxy with browser you must import CA certificate of proxy (stored by default in ~/.cruster/cruster.cer) into browser manually.

Help output

$ cruster help
Usage: cruster [OPTIONS] [COMMAND]

Commands:
  interactive  Default interactive Cruster mode. This mode will be used if none is specified
  dump         Enable non-interactive dumping mode: all communications will be shown in terminal output
  cli          Cruster Command Line Interface
  help         Print this message or the help of the given subcommand(s)

Options:
  -W, --workplace <WORKPLACE_DIR>    Path to workplace, where data (configs, certs, projects, etc.) will be stored. Cannot be set by config file.
  -c, --config <YAML_CONFIG>         Path to config with YAML format. Cannot be set by config file.
  -a, --address <ADDR>               Address for proxy to bind, default: 127.0.0.1
  -p, --port <PORT>                  Port for proxy to listen to, default: 8080
      --debug-file <FILE-TO-WRITE>   A file to write debug messages, mostly needed for development
  -P, --project <PATH-TO-DIR>        Path to directory to store/load Cruster state. All files could be rewritten!
      --strict                       If set, none of out-of-scope data will be written in storage, otherwise it will be just hidden from ui
  -I, --include-scope <REGEX>        Regex for URI to include in scope, i.e. ^https?://www\.google\.com/.*$. Option can repeat.
  -E, --exclude-scope <REGEX>        Regex for URI to exclude from scope, i.e. ^https?://www\.google\.com/.*$. Processed after include regex if any. Option can repeat.
      --editor <PATH_TO_EXECUTABLE>  Path to editor executable to use in CLI mode
  -h, --help                         Print help
  -V, --version                      Print version

Cruster has several commands (interactive, dump, etc.) and options. Options used after executable name (i.e. cruster -p 8082) are global and also can be managed with config. Options used after commands are command-specific. You always can call help or -h to learn details.

Text User Interface

You can find more details at TUI.md

To run TUI use

cruster

or

cruster interactive

Interactive mode is fully controlled by global Cruster cmd-options or config.

You will be provided with interactive interface inside your terminal, which you can control with keyboard (and mouse, sometimes).

This type of interface will be developing longer than others, since it requires more efforts.

Navigation on text user interface

? - Show this help view
<Enter> - 
    <On Proxy Table> - Show interactive fullscreen view for selected request and response contents
    <On Filter View> - Apply written filter
    <On Repeater View> - Apply edited request / Send
<Esc> - Close secondary view (i.e. help, errors, etc.)
<Shift> + r - Repeat request selected on table
<Shift> + s - Store proxy data on drive, file path is configured on start
<Shift> + f - Set filter for table
e - Show error logs view
f - 
    <On FullScreen Request/Response> - Copy request and response content to clipboard
i - 
    <On Repeater View> - Edit request
p - 
    <On Repeater View> - Show parameters
r - 
    <On Proxy Table> - Show active repeaters
    <On FullScreen Request/Response> - Copy request content to clipboard
s - 
    <On FullScreen Request/Response> - Copy response content to clipboard
t - Show fullscreen HTTP proxy table
q - Quit

Dump mode

To run dump mode, use

cruster dump

Example:

$ ./cruster -p 8082 dump -v
errr No storage defined, traffic will not be saved!
http      0 --> GET http://google.com/ HTTP/1.1

http      0 <== HTTP/1.1 301 Moved Permanently
http      0 <== cache-control: public, max-age=2592000
http      0 <== content-length: 219
http      0 <== content-security-policy-report-only: object-src 'none';base-uri 'self';script-src 'nonce-9zrh7P5SjSprYVnylsm-xg' 'strict-dynamic' 'report-sample' 'unsafe-eval' 'unsafe-inline' https: http:;report-uri https://csp.withgoogle.com/csp/gws/other-hp
http      0 <== content-type: text/html; charset=UTF-8
http      0 <== date: Sat, 27 May 2023 13:05:45 GMT
http      0 <== expires: Mon, 26 Jun 2023 13:05:45 GMT
http      0 <== location: http://www.google.com/
http      0 <== server: gws
http      0 <== x-frame-options: SAMEORIGIN
http      0 <== x-xss-protection: 0
http      0 <==

http      1 --> GET http://www.google.com/ HTTP/1.1

http      1 <== HTTP/1.1 200 OK
...

Dump mode has several command-specific options:

$ cruster dump -h
Enable non-interactive dumping mode: all communications will be shown in terminal output

Usage: cruster dump [OPTIONS]

Options:
  -v...       Verbosity in dump mode, ignored in intercative mode. 0: request/response first line,
              1: 0 + response headers, 2: 1 + request headers, 3: 2 + response body, 4: 3 + request body
      --nc    Disable colorizing in dump mode, ignored in interactive mode
  -h, --help  Print help

CLI

You can find more details at CLI.md

CLI works with data, stored in dump or interactive modes, so it is required to provide a path to project to use CLI (via cmd argument or config).

CLI is good addition to dump mode, it allows to manage all data collected with proxy in command-by-command way. To run CLI, use

cruster cli

For example, it can simply print dumped HTTP traffic:

$ cruster cli http show 2
    ID   METHOD                         HOSTNAME                                                                   PATH      STATUS          LENGTH

     0      GET                       google.com /                                                                              301             219
     1      GET                   www.google.com /                                                                              200           19957

Probably, in future all new features will be developing for CLI firstly and then for TUI

Features and Compilation

Cruster contains the following features (in terms of Rust):

  • rcgen-ca - use Rcgen to build local CA;
  • crosstrem - use Crossterm as Text User Interface backend (cross-platform);
  • default - includes previous two features, enabled by default;
  • openssl-ca - use OpenSSL to build local CA; requires OpenSSL (libssl) to be installed;
  • ncurses - use Ncurses as Text User Interface backend; requires Ncurses (libncurses/libncurses5/libncursesw5) to be installed;
  • termion - use Termion as Text User Interface backend;

All features can be devided in two groups:

  • CA backend:
    • rcgen-ca
    • openssl-ca
  • TUI backend:
    • crossterm
    • ncurses
    • termion

To successfully compile Cruster one feature from each group must be defined (default feature do it by default).

Installation

The only option for now is to install from source code with git and cargo. You can use the following command:

Fully Rust-Based Installation

cargo install --git https://github.com/sinKettu/cruster --tag "v0.7.2"

This command will install Cruster using rcgen library to build local certificate authority and crossterm as TUI backend. So, you are going to get full-rust package.

In some case crossterm and termion backends can flicker. It is a known cursive issue. For Cruster the buffered backend is implemented, but it is not for sure, that buffering will cover all cases. If you faced with such problem, you can use ncurses backend.

If, for some reason, you do not want to use rcgen to handle certificates, you can use openssl, see below.

Using OpenSSL for Local CA

You can install Cruster and use OpenSSL to handle certificates. In this case, you have to had OpenSSL installed on your computer.

cargo install --git https://github.com/sinKettu/cruster --tag "v0.7.2" --no-default-features --features openssl-ca,crossterm

Using Ncurses as TUI Backend

Ncurses can be used as TUI backend instead of Crossterm (which is fully rust-written). In this case, you have to had Ncurses installed on your computer.

cargo install --git https://github.com/sinKettu/cruster --tag "v0.7.2" --no-default-features --features ncurses,rcgen-ca

With Docker

Instead of usual installation you can use Cruster from a docker container. You can build your own:

$ cd cruster && sudo docker build . -f docker/Dockerfile -t local/cruster

Also you can build a version with use of openssl and ncurses:

$ cd cruster && sudo docker build . -f docker/Dockerfile-openssl-ncurses -t local/cruster

RoadMap

  • Improve proxy performance.
  • Navigate over Requests/Responses text.
  • Requests/Responses syntax highlight.
  • Intercepting requests/responses.
  • Manual repeater for requests.
  • Projects (like in Burp or ZAP), this thing will be developing with further improvements of Cruster.
  • Store projects and history on drive.
  • Scripting engine based on YAML syntax to write testcases and checks.
  • Scripting engine based on Python to write testcases and checks.
  • WS(S) support.
  • Improve documentation.
  • WS(S) proxy history visualization (like for HTTP(S)).
  • Reverse proxy mode.
  • And much more ...

Gratitude

Thank to projects, which are basics for mine:

  • Hudsucker - Library to build MitM proxy;
  • Cursive - Library to build text (console) user interface.

License

Copyright © Andrey Ivanov

cruster's People

Contributors

sinkettu avatar svbrunov avatar

Stargazers

Jason Nguyen avatar Fernando Barajas avatar Noah Dahlman avatar Nicolas RUFF avatar Arjen avatar  Daterlove avatar John Zhang avatar Raymond avatar  avatar  avatar Nicolas Trippar avatar Ahmed_Hany avatar kgaikj avatar Brian Moelk avatar  avatar  avatar Akbar Sherzod Khamidov avatar Rich Seymour avatar  avatar Ishan Marikar avatar NickAc avatar Wolfgang Werner avatar  avatar Mark Ruddy avatar Anas Ahmed Elgarhy avatar Ajam avatar Khaled Nassar avatar Javed Khan avatar Sean Jensen-Grey avatar Jakub Hlusička avatar Harry avatar  avatar Violetta Filatova avatar  avatar Dmitry Shimko avatar  avatar Jon Lewis avatar Noah Levitt avatar Kirill Bludilin avatar

Watchers

Noah Levitt avatar Ronie Martinez avatar  avatar

cruster's Issues

Ambiguous options and parameters in CLI mode

Expected - Cruster runs in CLI mode
Actual - Cruster throws an error about project not being provided to the CLI command.

Description -

In CLI mode issuing the below command results in an error -

Command -
cargo run cli http show 2

Result -
Error in Cruster CLI: Cruster CLI cannot work without project specified

The README is not clear on what a "project" is and how to provide it to the command.

docker installation error

pi@Chester:~/cruster $ sudo docker build . -f docker/Dockerfile -t local/cruster
[+] Building 163.1s (13/14) docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.04kB 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:22.04 1.2s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [ 1/10] FROM docker.io/library/ubuntu:22.04@sha256:e9569c25505f33ff72e88b2990887c9dcf230f23259da296eb814fc2b41af999 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 320.48kB 0.0s
=> CACHED [ 2/10] RUN mkdir /opt/cruster && useradd -u 4242 --shell /bin/bash --home /opt/cruster cruster && chown -R cruster /opt/cr 0.0s
=> CACHED [ 3/10] RUN apt-get update && apt-get install --no-install-recommends -y build-essential git ca-certifi 0.0s
=> CACHED [ 4/10] WORKDIR /opt/cruster 0.0s
=> CACHED [ 5/10] RUN curl --proto '=https' --tlsv1.2 -sSf -o rustup.sh https://sh.rustup.rs && sh rustup.sh -y && mkdir cruster-src 0.0s
=> CACHED [ 6/10] COPY src cruster-src/src 0.0s
=> CACHED [ 7/10] COPY Cargo.toml cruster-src/ 0.0s
=> CACHED [ 8/10] COPY Cargo.lock cruster-src/ 0.0s
=> ERROR [ 9/10] RUN cargo install --path ./cruster-src 161.7s

[ 9/10] RUN cargo install --path ./cruster-src:
0.671 Installing cruster v0.7.2 (/opt/cruster/cruster-src)
0.760 Updating crates.io index
5.359 Downloading crates ...
5.724 Downloaded waker-fn v1.1.1
5.755 Downloaded bytes v1.5.0
5.778 Downloaded bytecount v0.6.7
5.804 Downloaded wayland-sys v0.29.5
5.826 Downloaded colorchoice v1.0.0
5.842 Downloaded openssl-probe v0.1.5
5.854 Downloaded x11-clipboard v0.7.1
5.897 Downloaded wayland-commons v0.29.5
5.912 Downloaded autocfg v1.1.0
5.928 Downloaded num v0.4.1
5.950 Downloaded anstyle-query v1.0.2
5.970 Downloaded triomphe v0.1.11
5.989 Downloaded anstyle-parse v0.2.3
6.002 Downloaded bitflags v2.4.2
6.027 Downloaded enumset_derive v0.8.1
6.041 Downloaded webpki v0.22.4
6.096 Downloaded base64 v0.13.1
6.139 Downloaded darling_core v0.20.5
6.220 Downloaded tinyvec_macros v0.1.1
6.238 Downloaded form_urlencoded v1.2.1
6.247 Downloaded num-conv v0.1.0
6.258 Downloaded gethostname v0.2.3
6.266 Downloaded clap v4.4.18
6.319 Downloaded wayland-protocols v0.29.5
6.388 Downloaded rustls-native-certs v0.6.3
6.406 Downloaded asn1-rs-derive v0.4.0
6.416 Downloaded time-core v0.1.2
6.425 Downloaded pem v1.1.1
6.435 Downloaded once_cell v1.19.0
6.448 Downloaded errno v0.3.8
6.456 Downloaded digest v0.10.7
6.472 Downloaded futures-executor v0.3.30
6.484 Downloaded futures-io v0.3.30
6.492 Downloaded quote v1.0.35
6.517 Downloaded sync_wrapper v0.1.2
6.526 Downloaded cursive_core v0.3.7
6.593 Downloaded utf8parse v0.2.1
6.600 Downloaded num-iter v0.1.43
6.606 Downloaded strsim v0.10.0
6.613 Downloaded tokio-macros v2.2.0
6.619 Downloaded utf-8 v0.7.6
6.624 Downloaded untrusted v0.9.0
6.638 Downloaded tokio-native-tls v0.3.1
6.653 Downloaded signal-hook-registry v1.4.1
6.663 Downloaded cursive_buffered_backend v0.6.1
6.674 Downloaded try-lock v0.2.5
6.683 Downloaded unsafe-any-ors v1.0.0
6.692 Downloaded openssl-sys v0.9.99
6.734 Downloaded mime v0.3.17
6.763 Downloaded uuid v1.7.0
6.806 Downloaded hyper-tls v0.5.0
6.832 Downloaded lock_api v0.4.11
6.847 Downloaded displaydoc v0.2.4
6.867 Downloaded hyper-rustls v0.24.2
6.880 Downloaded cursive_table_view v0.14.0
6.891 Downloaded shellexpand v2.1.2
6.902 Downloaded num-complex v0.4.4
6.916 Downloaded smallvec v1.13.1
6.933 Downloaded unicode-bidi v0.3.15
6.954 Downloaded rustls-pemfile v1.0.4
6.975 Downloaded native-tls v0.2.11
6.996 Downloaded synstructure v0.12.6
7.006 Downloaded brotli-decompressor v2.5.1
7.057 Downloaded tempfile v3.9.0
7.077 Downloaded unicode-xid v0.2.4
7.089 Downloaded unicode-segmentation v1.10.1
7.117 Downloaded serde_yaml v0.8.26
7.138 Downloaded cursive v0.20.0
7.180 Downloaded ident_case v1.0.1
7.189 Downloaded spin v0.9.8
7.209 Downloaded unicode-normalization v0.1.22
7.238 Downloaded zstd v0.13.0
7.261 Downloaded wayland-scanner v0.29.5
7.273 Downloaded lazy_static v1.4.0
7.285 Downloaded moka v0.11.3
7.347 Downloaded xml-rs v0.8.19
7.374 Downloaded log4rs v1.2.0
7.405 Downloaded indexmap v2.2.2
7.438 Downloaded asn1-rs v0.5.2
7.489 Downloaded rand v0.8.5
7.519 Downloaded openssl v0.10.63
7.589 Downloaded time v0.3.34
7.623 Downloaded rustls v0.20.9
7.710 Downloaded rustls-webpki v0.101.7
7.819 Downloaded vcpkg v0.2.15
8.169 Downloaded webpki-roots v0.22.6
8.198 Downloaded rustix v0.37.27
8.353 Downloaded zstd-sys v2.0.9+zstd.1.5.5
8.483 Downloaded linux-raw-sys v0.4.13
8.747 Downloaded brotli v3.4.0
8.899 Downloaded encoding_rs v0.8.33
9.054 Downloaded ring v0.16.20
9.377 Downloaded ring v0.17.7
9.652 Downloaded libc v0.2.153
9.772 Downloaded linux-raw-sys v0.3.8
9.859 Downloaded idna v0.5.0
9.889 Downloaded syn v2.0.48
9.931 Downloaded syn v1.0.109
9.974 Downloaded tokio v1.36.0
10.36 Downloaded regex-automata v0.4.5
10.44 Downloaded rustix v0.38.31
10.54 Downloaded regex-syntax v0.8.2
10.57 Downloaded zerocopy v0.7.32
10.64 Downloaded webpki-roots v0.25.4
10.66 Downloaded rustls v0.21.10
10.71 Downloaded nix v0.24.3
10.75 Downloaded hyper v0.14.28
10.78 Downloaded bstr v1.9.0
10.83 Downloaded x11rb-protocol v0.10.0
10.88 Downloaded regex-automata v0.1.10
10.91 Downloaded tokio-util v0.7.10
10.93 Downloaded async-compression v0.4.6
10.97 Downloaded mio v0.8.10
10.99 Downloaded regex v1.10.3
11.05 Downloaded tracing v0.1.40
11.07 Downloaded http v0.2.11
11.08 Downloaded hashbrown v0.12.3
11.10 Downloaded flate2 v1.0.28
11.12 Downloaded num-bigint v0.4.4
11.14 Downloaded bstr v0.2.17
11.18 Downloaded serde_json v1.0.113
11.21 Downloaded iana-time-zone v0.1.60
11.22 Downloaded log v0.4.20
11.23 Downloaded tracing-core v0.1.32
11.24 Downloaded unicode-width v0.1.11
11.25 Downloaded serde_derive v1.0.196
11.26 Downloaded indexmap v1.9.3
11.27 Downloaded h2 v0.3.24
11.30 Downloaded petgraph v0.6.4
11.36 Downloaded socket2 v0.5.5
11.37 Downloaded x509-parser v0.14.0
11.39 Downloaded destructure_traitobject v0.2.0
11.40 Downloaded chrono v0.4.33
11.43 Downloaded memoffset v0.6.5
11.43 Downloaded typenum v1.17.0
11.44 Downloaded io-lifetimes v1.0.11
11.45 Downloaded yaml-rust v0.4.5
11.47 Downloaded unicode-ident v1.0.12
11.48 Downloaded tinyvec v1.6.0
11.49 Downloaded socket2 v0.4.10
11.50 Downloaded signal-hook v0.3.17
11.51 Downloaded futures-util v0.3.30
11.56 Downloaded reqwest v0.11.24
11.59 Downloaded pin-project v1.1.4
11.64 Downloaded minimal-lexical v0.2.1
11.66 Downloaded num-rational v0.4.1
11.67 Downloaded rcgen v0.10.0
11.68 Downloaded rustls-webpki v0.100.3
11.70 Downloaded hudsucker v0.20.0
11.72 Downloaded clap_builder v4.4.18
11.75 Downloaded tokio-rustls v0.23.4
11.75 Downloaded httparse v1.8.0
11.76 Downloaded futures v0.3.30
11.78 Downloaded tungstenite v0.19.0
11.79 Downloaded yasna v0.5.2
11.80 Downloaded webpki-roots v0.23.1
11.82 Downloaded url v2.5.0
11.83 Downloaded ipnet v2.9.0
11.84 Downloaded httpdate v1.0.3
11.84 Downloaded tokio-rustls v0.24.1
11.85 Downloaded tracing-attributes v0.1.27
11.86 Downloaded zstd-safe v7.0.0
11.87 Downloaded hyper-tungstenite v0.10.0
11.88 Downloaded tokio-tungstenite v0.19.0
11.88 Downloaded slab v0.4.9
11.89 Downloaded rand_core v0.6.4
11.90 Downloaded serde_urlencoded v0.7.1
11.90 Downloaded serde-value v0.7.0
11.91 Downloaded percent-encoding v2.3.1
11.91 Downloaded ordered-float v2.10.1
11.92 Downloaded untrusted v0.7.1
11.92 Downloaded futures-lite v1.13.0
11.93 Downloaded futures-channel v0.3.30
11.94 Downloaded async-trait v0.1.77
11.95 Downloaded rand_chacha v0.3.1
11.96 Downloaded quanta v0.11.1
11.97 Downloaded parking_lot v0.12.1
11.98 Downloaded xi-unicode v0.3.0
11.99 Downloaded x11rb v0.10.1
12.03 Downloaded thiserror-impl v1.0.56
12.03 Downloaded thiserror v1.0.56
12.06 Downloaded version_check v0.9.4
12.06 Downloaded cli-clipboard v0.4.0
12.07 Downloaded rusticata-macros v4.1.0
12.08 Downloaded oid-registry v0.6.1
12.08 Downloaded miniz_oxide v0.7.2
12.09 Downloaded stable_deref_trait v1.2.0
12.09 Downloaded thread-id v4.2.1
12.10 Downloaded signal-hook-mio v0.2.3
12.10 Downloaded futures-core v0.3.30
12.11 Downloaded fnv v1.0.7
12.11 Downloaded fastrand v2.0.1
12.12 Downloaded dirs-sys v0.3.7
12.13 Downloaded dirs v4.0.0
12.13 Downloaded itoa v1.0.10
12.14 Downloaded getrandom v0.2.12
12.15 Downloaded proc-macro2 v1.0.78
12.16 Downloaded polling v2.8.0
12.17 Downloaded num-traits v0.2.17
12.19 Downloaded ryu v1.0.16
12.20 Downloaded aho-corasick v1.1.2
12.22 Downloaded derivative v2.2.0
12.25 Downloaded crossbeam-channel v0.5.11
12.27 Downloaded typemap-ors v1.0.0
12.27 Downloaded spin v0.5.2
12.28 Downloaded sha1 v0.10.6
12.29 Downloaded http-body v0.4.6
12.29 Downloaded der-parser v8.2.0
12.31 Downloaded pin-project-lite v0.2.13
12.33 Downloaded pin-project-internal v1.1.4
12.34 Downloaded mime_guess v2.0.4
12.35 Downloaded scopeguard v1.2.0
12.35 Downloaded futures-macro v0.3.30
12.36 Downloaded num_threads v0.1.6
12.36 Downloaded tower-service v0.3.2
12.36 Downloaded powerfmt v0.2.0
12.37 Downloaded hashbrown v0.14.3
12.39 Downloaded crossterm v0.25.0
12.42 Downloaded num-integer v0.1.45
12.42 Downloaded cc v1.0.83
12.44 Downloaded arc-swap v1.6.0
12.45 Downloaded unicase v2.7.0
12.46 Downloaded asn1-rs-impl v0.1.0
12.46 Downloaded log-mdc v0.1.0
12.46 Downloaded want v0.3.1
12.47 Downloaded generic-array v0.14.7
12.47 Downloaded futures-task v0.3.30
12.48 Downloaded futures-sink v0.3.30
12.48 Downloaded ppv-lite86 v0.2.17
12.49 Downloaded pkg-config v0.3.29
12.49 Downloaded pin-utils v0.1.0
12.50 Downloaded num_cpus v1.16.0
12.51 Downloaded scheduled-thread-pool v0.2.7
12.52 Downloaded owning_ref v0.4.1
12.52 Downloaded os_pipe v1.1.5
12.53 Downloaded linked-hash-map v0.5.6
12.53 Downloaded time-macros v0.2.17
12.54 Downloaded fixedbitset v0.4.2
12.55 Downloaded event-listener v2.5.3
12.55 Downloaded downcast-rs v1.2.0
12.56 Downloaded nom v7.1.3
12.58 Downloaded foreign-types-shared v0.1.1
12.58 Downloaded foreign-types v0.3.2
12.59 Downloaded equivalent v1.0.1
12.59 Downloaded crypto-common v0.1.6
12.59 Downloaded base64 v0.21.7
12.61 Downloaded parking_lot_core v0.9.9
12.62 Downloaded serde v1.0.196
12.63 Downloaded sct v0.7.1
12.65 Downloaded memchr v2.7.1
12.67 Downloaded deranged v0.3.11
12.67 Downloaded data-encoding v2.5.0
12.68 Downloaded darling v0.20.5
12.69 Downloaded crossbeam-epoch v0.9.18
12.71 Downloaded cpufeatures v0.2.12
12.71 Downloaded concurrent-queue v2.4.0
12.72 Downloaded clap_lex v0.6.0
12.72 Downloaded cfg-if v1.0.0
12.73 Downloaded async-lock v2.8.0
12.74 Downloaded wayland-client v0.29.5
12.75 Downloaded derive-new v0.5.9
12.75 Downloaded darling_macro v0.20.5
12.75 Downloaded anyhow v1.0.79
12.77 Downloaded block-buffer v0.10.4
12.78 Downloaded bitflags v1.3.2
12.79 Downloaded anstream v0.6.11
12.80 Downloaded enumset v1.1.3
12.81 Downloaded crossbeam-utils v0.8.19
12.82 Downloaded byteorder v1.5.0
12.83 Downloaded alloc-no-stdlib v2.0.4
12.83 Downloaded adler v1.0.2
12.84 Downloaded enum-map v2.7.3
12.85 Downloaded crc32fast v1.3.2
12.86 Downloaded async-io v1.13.0
12.86 Downloaded parking v2.2.0
12.87 Downloaded jobserver v0.1.27
12.88 Downloaded hyper-rustls v0.23.2
12.89 Downloaded anstyle v1.0.5
12.89 Downloaded wl-clipboard-rs v0.7.0
12.90 Downloaded alloc-stdlib v0.2.2
12.91 Downloaded humantime v2.1.0
12.91 Downloaded tree_magic_mini v3.0.3
12.92 Downloaded tagptr v0.2.0
12.93 Downloaded enum-map-derive v0.17.0
12.93 Downloaded colored v2.1.0
12.94 Downloaded fastrand v1.9.0
12.94 Downloaded openssl-macros v0.1.1
12.95 Downloaded ahash v0.8.7
13.17 Compiling libc v0.2.153
13.17 Compiling proc-macro2 v1.0.78
13.17 Compiling unicode-ident v1.0.12
13.17 Compiling autocfg v1.1.0
13.53 Compiling cfg-if v1.0.0
16.02 Compiling serde v1.0.196
17.78 Compiling once_cell v1.19.0
19.45 Compiling memchr v2.7.1
22.38 Compiling quote v1.0.35
23.57 Compiling jobserver v0.1.27
24.89 Compiling syn v2.0.48
27.11 Compiling cc v1.0.83
27.37 Compiling pkg-config v0.3.29
30.68 Compiling smallvec v1.13.1
32.45 Compiling version_check v0.9.4
32.59 Compiling getrandom v0.2.12
34.22 Compiling itoa v1.0.10
34.77 Compiling lock_api v0.4.11
35.00 Compiling pin-project-lite v0.2.13
35.24 Compiling parking_lot_core v0.9.9
35.86 Compiling num-traits v0.2.17
36.42 Compiling scopeguard v1.2.0
39.24 Compiling signal-hook-registry v1.4.1
40.89 Compiling parking_lot v0.12.1
46.17 Compiling ring v0.17.7
49.60 Compiling bytes v1.5.0
50.27 Compiling futures-core v0.3.30
50.93 Compiling slab v0.4.9
51.71 Compiling syn v1.0.109
51.83 Compiling fnv v1.0.7
52.04 Compiling untrusted v0.9.0
52.51 Compiling spin v0.9.8
53.29 Compiling socket2 v0.5.5
53.35 Compiling num_cpus v1.16.0
58.18 Compiling futures-sink v0.3.30
58.54 Compiling futures-io v0.3.30
59.68 Compiling bitflags v1.3.2
59.85 Compiling thiserror v1.0.56
63.14 Compiling num-integer v0.1.45
63.78 Compiling futures-channel v0.3.30
64.15 Compiling ring v0.16.20
65.62 Compiling futures-task v0.3.30
66.48 Compiling hashbrown v0.14.3
68.08 Compiling crossbeam-utils v0.8.19
69.56 Compiling pin-utils v0.1.0
69.70 Compiling time-core v0.1.2
70.76 Compiling equivalent v1.0.1
70.94 Compiling powerfmt v0.2.0
72.85 Compiling num-conv v0.1.0
73.12 Compiling vcpkg v0.2.15
73.90 Compiling time-macros v0.2.17
78.86 Compiling serde_derive v1.0.196
79.46 Compiling tokio-macros v2.2.0
85.33 Compiling thiserror-impl v1.0.56
87.77 Compiling futures-macro v0.3.30
95.63 Compiling futures-util v0.3.30
97.21 Compiling openssl-sys v0.9.99
101.0 Compiling indexmap v2.2.2
109.0 Compiling deranged v0.3.11
125.3 Compiling num_threads v0.1.6
127.1 Compiling bitflags v2.4.2
129.1 Compiling lazy_static v1.4.0
129.4 Compiling time v0.3.34
136.0 error: failed to run custom build command for openssl-sys v0.9.99
136.0
136.0 Caused by:
136.0 process didn't exit successfully: /opt/cruster/cruster-src/target/release/build/openssl-sys-3b19c89f57f7658b/build-script-main (exit status: 101)
136.0 --- stdout
136.0 cargo:rerun-if-env-changed=AARCH64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR
136.0 AARCH64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR unset
136.0 cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
136.0 OPENSSL_LIB_DIR unset
136.0 cargo:rerun-if-env-changed=AARCH64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR
136.0 AARCH64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR unset
136.0 cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
136.0 OPENSSL_INCLUDE_DIR unset
136.0 cargo:rerun-if-env-changed=AARCH64_UNKNOWN_LINUX_GNU_OPENSSL_DIR
136.0 AARCH64_UNKNOWN_LINUX_GNU_OPENSSL_DIR unset
136.0 cargo:rerun-if-env-changed=OPENSSL_DIR
136.0 OPENSSL_DIR unset
136.0 cargo:rerun-if-env-changed=OPENSSL_NO_PKG_CONFIG
136.0 cargo:rerun-if-env-changed=PKG_CONFIG_aarch64-unknown-linux-gnu
136.0 cargo:rerun-if-env-changed=PKG_CONFIG_aarch64_unknown_linux_gnu
136.0 cargo:rerun-if-env-changed=HOST_PKG_CONFIG
136.0 cargo:rerun-if-env-changed=PKG_CONFIG
136.0 cargo:rerun-if-env-changed=OPENSSL_STATIC
136.0 cargo:rerun-if-env-changed=OPENSSL_DYNAMIC
136.0 cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
136.0 cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
136.0 cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64-unknown-linux-gnu
136.0 cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64_unknown_linux_gnu
136.0 cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
136.0 cargo:rerun-if-env-changed=PKG_CONFIG_PATH
136.0 cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64-unknown-linux-gnu
136.0 cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64_unknown_linux_gnu
136.0 cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
136.0 cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
136.0 cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64-unknown-linux-gnu
136.0 cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64_unknown_linux_gnu
136.0 cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
136.0 cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
136.0 cargo:rerun-if-env-changed=OPENSSL_STATIC
136.0 cargo:rerun-if-env-changed=OPENSSL_DYNAMIC
136.0 cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
136.0 cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
136.0 cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64-unknown-linux-gnu
136.0 cargo:rerun-if-env-changed=PKG_CONFIG_PATH_aarch64_unknown_linux_gnu
136.0 cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
136.0 cargo:rerun-if-env-changed=PKG_CONFIG_PATH
136.0 cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64-unknown-linux-gnu
136.0 cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_aarch64_unknown_linux_gnu
136.0 cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
136.0 cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
136.0 cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64-unknown-linux-gnu
136.0 cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_aarch64_unknown_linux_gnu
136.0 cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
136.0 cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
136.0 run pkg_config fail: Could not run PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags openssl
136.0 The pkg-config command could not be found.
136.0
136.0 Most likely, you need to install a pkg-config package for your OS.
136.0 Try apt install pkg-config, or yum install pkg-config,
136.0 or pkg install pkg-config, or apk add pkgconfig depending on your distribution.
136.0
136.0 If you've already installed it, ensure the pkg-config command is one of the
136.0 directories in the PATH environment variable.
136.0
136.0 If you did not expect this build to link to a pre-installed system library,
136.0 then check documentation of the openssl-sys crate for an option to
136.0 build the library from source, or disable features or dependencies
136.0 that require pkg-config.
136.0
136.0 --- stderr
136.0 thread 'main' panicked at /opt/cruster/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.99/build/find_normal.rs:190:5:
136.0
136.0
136.0 Could not find directory of OpenSSL installation, and this -sys crate cannot
136.0 proceed without this knowledge. If OpenSSL is installed and this crate had
136.0 trouble finding it, you can set the OPENSSL_DIR environment variable for the
136.0 compilation process.
136.0
136.0 Make sure you also have the development packages of openssl installed.
136.0 For example, libssl-dev on Ubuntu or openssl-devel on Fedora.
136.0
136.0 If you're in a situation where you think the directory should be found
136.0 automatically, please open a bug at https://github.com/sfackler/rust-openssl
136.0 and include information about your system as well as this message.
136.0
136.0 $HOST = aarch64-unknown-linux-gnu
136.0 $TARGET = aarch64-unknown-linux-gnu
136.0 openssl-sys = 0.9.99
136.0
136.0
136.0 It looks like you're compiling on Linux and also targeting Linux. Currently this
136.0 requires the pkg-config utility to find OpenSSL but unfortunately pkg-config
136.0 could not be found. If you have OpenSSL installed you can likely fix this by
136.0 installing pkg-config.
136.0
136.0
136.0 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
136.0 warning: build failed, waiting for other jobs to finish...
160.1 error: failed to compile cruster v0.7.2 (/opt/cruster/cruster-src), intermediate artifacts can be found at /opt/cruster/cruster-src/target.
160.1 To reuse those artifacts with a future compilation, set the environment variable CARGO_TARGET_DIR to that path.


Dockerfile:36

35 |
36 | >>> RUN cargo install
37 | >>> --path ./cruster-src
38 |

ERROR: failed to solve: process "/bin/sh -c cargo install --path ./cruster-src" did not complete successfully: exit code: 101
pi@Chester:~/cruster $

Cruster 0.4.5: Could not find certificate file upon first run

Dear Andrey Ivanov (@sinKettu),

First of all, thank you for making and sharing the «Cruster» program!

This GitHub issue represents a defect.

Scenario

Preconditions

The first run or, generally speaking, the «working» directory (~/.cruster) is empty.

Steps to reproduce

$ rm -rf ~/.cruster
$ mkdir ~/.cruster
$ cruster

Expected result

The program starts successfully (without error messages).

Actual result

The program fails to start with the error message:

$ cruster
Error: ConfigError("Could not find file or dir at relative path 'cruster.cer' neither in workplace nor working dir")

Root cause analysis

Root cause

The configuration validation implemented by the config::handle_user_input() function is unnecessarily restrictive: it requires the existence of the certificate file and the key file.
After the configuration validation fails due to the absent certificate file, the program stops working.

However, if the program continued (did not stop) working, these files would be handled (created, if do not exist) later on by the utils::generate_key_and_cer() function.

Solution

Update the configuration validation not to require the existence of the certificate file and the key file.

Pull request

Cruster 0.4.5: Config: Hotfix: Could not find certificate file upon first run by svbrunov · Pull Request #7 · sinKettu/cruster.

Best regards,
Sergey Vyacheslavovich Brunov.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.