|
1 | 1 | ICANN RDAP CLI |
2 | 2 | ============== |
3 | 3 |
|
| 4 | +This package consists of the following commands: |
| 5 | +* The [`rdap`](https://github.com/icann/icann-rdap/wiki/RDAP-command) command is a general-purpose RDAP command line client. |
| 6 | +* The [`rdap-test`](https://github.com/icann/icann-rdap/wiki/RDAP-TEST-command) command is a testing tool for RDAP. |
| 7 | + |
| 8 | + |
| 9 | + |
4 | 10 | This is a command-line interface (CLI) client for the Registration Data Access Protocol (RDAP) written and sponsored |
5 | 11 | by the Internet Corporation for Assigned Names and Numbers [(ICANN)](https://www.icann.org). |
6 | 12 | RDAP is standard of the [IETF](https://ietf.org/), and extensions |
7 | 13 | to RDAP are a current work activity of the IETF's [REGEXT working group](https://datatracker.ietf.org/wg/regext/documents/). |
8 | 14 | More information on ICANN's role in RDAP can be found [here](https://www.icann.org/rdap). |
9 | 15 | General information on RDAP can be found [here](https://rdap.rcode3.com/). |
10 | 16 |
|
11 | | -Installing the RDAP Client |
12 | | --------------------------- |
13 | | - |
14 | | -### Pre-Built Binaries |
15 | | - |
16 | | -Pre-built binaries are available for most mainstream systems: x86_64 and Arm 64bit for Linux GNU systems, x86_64 and Arm 64bit |
17 | | -macOS, and x86_64 for Windows. You may find the pre-built binaries on the [Releases](https://github.com/icann/icann-rdap/releases) |
18 | | -page. |
19 | | - |
20 | | -For non-Ubuntu Linux, compiling from crates.io or source (both are easy) is recommended to avoid issues with dynamic linking to OpenSSL. |
21 | | - |
22 | | -### Compiling from crates.io |
23 | | - |
24 | | -If you have [Rust](https://www.rust-lang.org/) installed on your system, then compiling from source is |
25 | | -very straightforward. If you do not have Rust installed on your system, it is usually very easy to do: |
26 | | -see [Rustup](https://rustup.rs/). |
27 | | - |
28 | | -If you are on a Linux system, you will need OpenSSL development files. For Debian and Ubuntu, this is |
29 | | -usually done via `apt install pkg-config libssl-dev`. For other Linux systems, consult your packaging |
30 | | -documentation. |
31 | | - |
32 | | -For macOS and Windows, the native TLS libraries are used, and there are no steps needed to install them. |
33 | | - |
34 | | -To build and install: `cargo install icann-rdap-cli`. |
35 | | - |
36 | | -### Compiling from Source |
37 | | - |
38 | | -If you have [Rust](https://www.rust-lang.org/) installed on your system, then compiling from source is |
39 | | -very straightforward. If you do not have Rust installed on your system, it is usually very easy to do: |
40 | | -see [Rustup](https://rustup.rs/). |
41 | | - |
42 | | -If you are on a Linux system, you will need OpenSSL development files. For Debian and Ubuntu, this is |
43 | | -usually done via `apt install pkg-config libssl-dev`. For other Linux systems, consult your packaging |
44 | | -documentation. |
45 | | - |
46 | | -For macOS and Windows, the native TLS libraries are used, and there are no steps needed to install them. |
47 | | - |
48 | | -Run the tests: `cargo test` |
49 | | - |
50 | | -Then build the software: `cargo build --release`. The 'rdap' executable binary will be available in the `target/release` directory. |
51 | | - |
52 | | -Using the RDAP Client |
53 | | ---------------------- |
54 | | - |
55 | | -The basic usage is `rdap XXX` where XXX is a domain name, IP address, AS number, etc... |
56 | | - |
57 | | -For more advanced usage, run `rdap --help` which should yield the extensive help guide. |
58 | | - |
59 | | -Paging Output |
60 | | -------------- |
61 | | - |
62 | | -The client has a built-in (embedded) pager. Use of this pager is controlled via the `RDAP_PAGING` |
63 | | -environment variable and the `-P` command argument. |
64 | | - |
65 | | -It takes three values: |
66 | | - |
67 | | -* "embedded" - use the built-in pager |
68 | | -* "auto" - use the built-in pager if the program is being run from a terminal |
69 | | -* "none" - use no paging |
70 | | - |
71 | | -For example, `-P embedded` will default to using the built-in pager. |
72 | | - |
73 | | -By default, the client will not use a pager. |
74 | | - |
75 | | -When set to "auto", the client determines if a pager is appropriate. |
76 | | -This is done by attempting to determine if the terminal is interactive or not. If the terminal |
77 | | -is not interactive, paging will be turned off otherwise it will be on. |
78 | | - |
79 | | -Output Format |
80 | | -------------- |
81 | | - |
82 | | -By default, the client will attempt to determine the output format of the information. If it determines the shell |
83 | | -is interactive, output will be in `rendered-markdown`. Otherwise, the output will be JSON. |
84 | | - |
85 | | -You can explicitly control this behavior using the `-O` command argument or the `RDAP_OUTPUT` environment variable |
86 | | -(see below). |
87 | | - |
88 | | -Directing Queries To A Specific Server |
89 | | --------------------------------------- |
90 | | - |
91 | | -By default, the client will use the RDAP bootstrap files provided by IANA to determine the authoritative server |
92 | | -for the information being requested. These IANA files have the "base URLs" for the RDAP servers. |
93 | | - |
94 | | -You can override this behavior by either specifying a base "object tag" from the IANA object tags registry or with |
95 | | -an explicit URL. |
96 | | - |
97 | | -An object tag can be specified with the `-b` command argument or the `RDAP_BASE` environment variable (see below). |
98 | | -For example, `-b arin` will direct the client to find the ARIN server in the RDAP object tag registry. |
99 | | - |
100 | | -An explicit base URL can be specified using the `-B` command or the `RDAP_BASE_URL` environment variable. |
101 | | - |
102 | | -Caching |
103 | | -------- |
104 | | - |
105 | | -By default, the client will cache data based on the request URL and "self" links provided in the RDAP results. |
106 | | - |
107 | | -This can be turned off with the `-N` command parameter or by setting the `RDAP_NO_CACHE` environment variable to "true". |
108 | | - |
109 | | -Logging |
110 | | -------- |
111 | | - |
112 | | -The client logs errors, warning, and other information on its processing. This can be controlled with the |
113 | | -`--log-level` command argument or the `RDAP_LOG` environment variable. |
114 | | - |
115 | | -Secure Connections |
116 | | ------------------- |
117 | | - |
118 | | -By default, the client will use secure connections. The following arguments and environment variables can be used |
119 | | -to modify this behavior: |
120 | | - |
121 | | -* `-T` or `RDAP_ALLOW_HTTP` : RDAP servers should be using HTTPS. When given or set to true, HTTP will be allowed. |
122 | | -* `-K` or `RDAP_ALLOW_INVALID_HOST_NAMES` : Allows HTTPS connections in which the host name does not match the certificate. |
123 | | -* `-I` or `RDAP_ALLOW_INVALID_CERTIFICATES` : Allows HTTPS connections in which the TLS certificate is invalid. |
124 | | - |
125 | | -Configuration |
126 | | -------------- |
127 | | - |
128 | | -Configuration of this program may be set using environment variables or |
129 | | -using an environment variables configuration file in the configuration |
130 | | -directory of this program. An example is automatically written to the |
131 | | -configuration directory. This configuraiton file may be customized by |
132 | | -uncommenting out the provided environment variable settings. |
133 | | - |
134 | | -The location of the configuration file is platform dependent. |
135 | | - |
136 | | -On Linux, this file is located at $XDG_CONFIG_HOME/rdap/rdap.env or |
137 | | -$HOME/.config/rdap/rdap.env. |
138 | | - |
139 | | -On macOS, this file is located at |
140 | | -$HOME/Library/Application Support/rdap/rdap.env. |
141 | | - |
142 | | -On Windows, this file is located at |
143 | | -{FOLDERID_RoamingAppData}\rdap\config\rdap.env. |
144 | | - |
145 | | -Resetting |
146 | | ---------- |
| 17 | +Installation and Usage |
| 18 | +---------------------- |
147 | 19 |
|
148 | | -Use the `--reset` argument to reset all client state. This will remove the RDAP and IANA caches and |
149 | | -reset the `rdap.env` file (see above) to the default. |
| 20 | +See the [project wiki](https://github.com/icann/icann-rdap/wiki) for information on installation |
| 21 | +and usage of this software. |
150 | 22 |
|
151 | 23 |
|
152 | 24 | License |
|
0 commit comments