on macOS

This document uses the command line from client terminal.

Installation

Execute the following command to install.

$ curl -L  dl-mole.freaker.io/install.sh |bash

Startup

Startup command

Execute the following command with the required options specified below.

$ mole

Required Options

Description

Example

-f, --forward string

set hostname (or IP) and port of the connection destination on the client side

locathost:8080

-h, --host string

specify original host domain

🚩 Issued at the time of contract

mole-sample.com

-k, --Secret string

specify secret key

🚩 Issued at the time of contract

AAAbbbCCCddd

-s, --subdomain string

set subdomain

🚩 You can set your favorite subdomain

test

👆 When connecting as in the above Example, use the following command.

(sample command)
$ mole -f localhost:8080 -h mole-sample.com -k AAAbbbCCCddd -s test

Saving connection history

Executing the start command will display the selection of the connection history save setting. Enter y to save or n to not save and execute, when the following message is displayed. (If you enter n , the connection will be made without saving.

There is no config file. Do you want to save it? y/n:

If saving

Save connection history to config file. If you enter y the following message is displayed. Enter the name of the profile to save and execute.

save config your home path please enter profile name, default [mole] :

💡A file named <YourProfileName>.yaml is created in the directory where is ~ / .mole / on the client side. Running without any input creates a file named mole.yaml with default settings.

💡If the connection history is saved, you can connect to the saved connection simply by specifying the saved profile name in the option -c when the next time you connect.

Display when connected

When connected, it will be displayed as follows.

Using the URL displayed in https url , you can browse the specified connection destination from your browser.

(sample display)
mole by RHEMS Japan

           .-"-.
         /|6 6|\
        {/(_0_)\}
         _/ ^ \_
        (/ /^\ \)-'
         ""' '""

 revision       master-154960f
 host           mole-sample.com
 localEndpoint  localhost:8080
 http url       http://test.mole-sample.com
 https url      https://test.mole-sample.com
 tcp            mole-sample.com 51025

 Press ctl+c or esc exit

Connection in fileserver mode

You can connect in fileserver mode by executing the startup command with the local directory specified in the fileserver mode option. The connection history can be saved in the configuration file in the same way as Saving connection history in the previous section.

$ mole

Required Options

Description

Example

--fileserver string

set a specific directory on the client side

/Users/moletaro/test

h, --host string

specify original host domain

🚩 Issued at the time of contract

mole-sample.com

-k, --Secret string

specify secret key

🚩 Issued at the time of contract

AAAbbbCCCddd

-s, --subdomain string

set subdomain

🚩 You can set your favorite subdomain

test

👆When connecting as in the above Example, use the following command.

(sample command)
$ mole --fileserver /Users/sampleuser/test -h mole-sample.com -k AAAbbbCCCddd -s test

Other options

The following are details other than the required options.

Options

Description

-v, --version

display version

-c, --profile string

set profile

-a, --append

append the configuration file of profile

--help

display help

-b, --basic string

set basic authentication

--allow-ip string

set specific IP to allow

--domain string

set custom domain

--host-header string

set custom host-header

Stop

Enter ctl+c or esc to disconnect.

最終更新