Using the Connectify Command Line (MAX Users)

Connectify includes a command line program which allows you to control many of the settings that are normally manipulated through the user interface.

Usage:

connectify_cli --interactive | 
       [ help | version | info | 
       start [--ssid <hotspot name>]  [--pass <hotspot password>] [--inet-mode routed|bridged] [--inet <auto|none|<adapter guid>>] | 
       stop | status | settings | list-adapters | clients [--connected|disconnected] | 
       firewall [--internet [on|off]] [--local [on|off]] [--adblock [on|off]] | 
       dhcp [managed | <IP as 10.0.###.1 or 192.168.###.1>] | 
       startup [never|always|resume] | pause [never|onnointernet] | 
       client ip|mac|hostname [--gaming never|auto|psn|xbl|nwc] [--internet on|off] [--local on|off] | 
       errorcodes ]

The output of the command is formatted as JSON to make processing from other programs easier. The first field, that is guaranteed to exist, is a boolean named "res".  If res is true, then the command ran successfully, and the JSON also contains the results of the command (see below). If "res" is false, then there was an error.  In this case, there is an "err" field which contains an object with both an integer errorCode and an a text errorText.  For example:

{"err":{"errorCode":3477078016,"errorText":"Unknown Error Occurred"},"res":false}

"--interactive" puts the command line program in interactive mode, where it takes one command per line, then outputs results.  Each command output comes as a single line of text (which, for commands like "clients" and "list-adapters", can be extremely long, do not read into a fixed size buffer).  "quit" exits the program.

Commands

help

Shows the usage message.helphelp

info

Shows information about the current state of the hotspot.

Sample Output:

 {"res":true,"info":{"adblockTrackerBlocks":0,"adblockTrackerBlocksAllTime":3,"hostName":"MYPC","ip":"192.168.137.1","repeatedNetwork":"","upTime":636695024518064056,"upstreamInterface":null}}

start

Sends the command to start the hotspot and waits for the result.  If the hotspot is already Enabled, it will restart, stopping and then starting again when it receives this command.  

Optional arguments:

  • --ssid - The name that clients see to join the hotspot
  • --pass - password for clients to join this hotspot
  • --inet-mode
    • routed - Connectify uses a NAT to translate all client traffic to come from the Connectify computer's IP address
    • bridged - Connectify passes client traffic through, allowing clients to appear to be on the shared network.  Only works on networks like Wi-Fi and Ethernet where one connection can support multiple IP addresses.
  • --inet       See also http://support.connectify.me/article/36-what-should-i-choose-for-internet-to-share
    • auto - Selects the best Internet connection.   If connection stops working, will dynamically select another connection if one is available
    • none - No Internet sharing.  
    • <adapter guid> - The adapter Guids can be found using the list-adapters command, below.

Sample Output:

	{"err":null,"res":true}

stop

Sends the command to stop the hotspot.  Waits until the command completes to return results.  

Sample Output:

	{"err":null,"res":true}

status

Returns the state of the hotspot in a string field named "status", which will have one of the following values:

  • Disabled - Hotspot is not running.  Use "start" to start it.
  • Enabled - Hotspot is running, and waiting for clients.
  • Starting - Hotspot is in midst of starting up.  If successful, will transition to Enabled. 
  • Stopping - Hotspot is stopping, will soon be Disabled.
  • Restarting - Hotspot is restarting (stopping, then starting).
  • Paused - Hotspot has paused itself, stopping the hotspot because it has no Internet connectivity.  This stops the hotspot from becoming a "honeypot" trap.  Note that if the hotspot was started with --inet-mode=none, it will never enter this state, as it knows it is expected to run without internet.
  • Unknown - The Connectify Service is not running.    

Sample Output:

	{"res":true,"status":"Enabled"}

settings

Returns the current configuration of the hotspot.  

  • ConfiguredToRun - Boolean of whether the hotspot is attempting to run (if true could be Starting, Enabled or Paused.  Use status for actual value)
  • bridged  - Boolean of whether the NAT is set to bridged.  If false, it is NATing.
  • internet - Boolean, or whether Internet is to be provided to clients
  • internetGuid: String of Guid of the adapter that is providing internet service.  
  • password: String of the Wi-Fi password clients must provide to join the hotspot
  • ssid: String of the SSID (Hotspot Name) for this hotspot.
{"res":true,"settings":{"ConfiguredToRun":true,"autoOffTimeout":0,"bridged":false,"currentAPGuid":"","currentAPMode":{"enc":0,"mode":0},"internet":true,"internetGuid":"{C2F340E8-12CF-4011-9103-0C78042CFE36}","maxClients":0,"password":"1234567890","repeatedProfile":"Gizis","ssid":"Connectify-alex"}}

list-adapters

Lists all of the network adapters on the system, with information on each:

  • Ip - IP address of this adapter.  0.0.0.0 if not assigned.
  • IpMask - The IP mask for this network (typically 255.255.255.0 or similar)
  • Guid - The Windows GUID of this adapter
  • Mac - MAC address
  • GwMac - MAC address of Internet gateway / router on this network.
  • Name - The user displayable name of this adapter.
  • Internet - Boolean of whether this adapter is currently connected to the Internet
  • Speed - The speed of the adapter as reported by Windows.  Note that this is usually the maximum bitrate that the adapter can handle, and has nothing to do with the kind of throughput that users will see in real life.

Sample Output:

{"res":true, "list-adapters":[{"SupportedModes":[{"enc":2,"mode":1}],"WarnNoInternet":true,"downstreamSettings":[],"upstreamSettings":[],"Name":"Realtek USB GbE Family Controller","Guid":"{A9633E36-9316-4C49-A3B9-9A86BC4C5527}","Index":11,"Mac":"00:E0:7C:C8:9C:A5","GwMac":"94:0C:6D:FE:2E:1A","Ip":"192.168.202.115","IpMask":"255.255.255.0","Type":1,"Speed":1000000000,"hasInternet":true,"State":4,"ExtraData":{"rii":{"Restricted":false},"wii":null,"eii":null}}}]}

clients

List the clients, with everything that Connectify knows about them (Name: Example Value - Description).  Defaults to showing all clients, connected or disconnected (historical).  However if either "--connected" or "--disconnected" is added, then the results will be filtered to only display that group. 

  • IP:"192.168.50.102" - IPv4 address for this device
  • MacString:"b8:44:d9:0c:79:ff", - MAC address of network adapter
  • SpeedKbpsDownload:0, - Instantaneous transfer rate.
  • SpeedKbpsUpload:0, - Instantaneous transfer rate.
  • StaticIP:null - static IP address, or null if using DHCP
  • UsageBytesDownload:43349153, - Total Bytes downloaded (ever).  
  • UsageBytesUpload:7726327  - Total Bytes downloaded (ever).  
  • accessRights:{"Internet":true,"Local":true}, - firewall settings for this device
  • dateconnected:"2016-05-19T19:05:10.263464Z" - Last time it connected
  • datefirstseen:"2016-05-14T21:14:57.3011848Z" - First time it ever connected
  • displayName:"",  - Optional display name, that can be set by user.
  • hostname:"agiziss-iPhone", - hostname, pulled from DHCP request 
  • icon:"os_apple.png" - icon being used in interface
  • receivedSignalStrength:0 - Not populated, just 0.
  • secondsConnected:19178 - total cumulative seconds that this device has ever been connected
  • state:1
    • 0=Connected
    • 1=Disconnected
    • 3=Removed (May appear briefly as clients are in process of disconnecting.  Can be safely treated as Disconnected.)
  • totalConnections:150 - total times this device has connected.
  • userSetIcon:false - unused
  • vci:null, - the VCI field from the client's DHCP request.  Occasionally reveals operating system.
  • vendor:"Apple, Inc." - determined by examining the OUI (beginning of MacString)

Sample Output:

{"res":true,"clients":[{"IP":"192.168.50.101","MacString":"b8:44:d9:0c:79:ff","SpeedKbpsDownload":0,"SpeedKbpsUpload":0,"StaticIP":null,"UsageBytesDownload":71979648,"UsageBytesUpload":9878791,"accessRights":{"Internet":true,"Local":true},"dateconnected":"2016-05-20T20:59:32.8181702Z","datefirstseen":"2016-05-14T21:14:57.3011848Z","displayName":"","hostname":"agiziss-iPhone","icon":"os_apple.png","receivedSignalStrength":0,"secondsConnected":27469,"state":0,"totalConnections":154,"userSetIcon":false,"vci":null,"vendor":"Apple, Inc."}]}

firewall

With no additional arguments this outputs the current firewall settings, each of which are true or false:

  • Internet:  Whether clients are allowed internet access
  • Local: Whether clients are allowed to access the host running Connectify and other clients on the network.  Note that even without Local access, clients can access the DHCP/DNS server.
  • Adblock: Enable or disable Hotspot's ad blocking

To change the settings use the [--internet on|off] [--local on|off] [--adblock on|off] arguments.

See also  http://support.connectify.me/article/193-firewall-options-in-connectify

Sample Output:

	{"res":true,"firewall":{"Internet":true,"Local":true}}
	

dhcp

dhcp [managed | <IP as 10.0.###.1 or 192.168.###.1>]

When run without any arguments, returns the current DHCP setting.  When an additional setting is added, sets the DHCP setting to that value.  Values:

  • "managed" - Allows Connectify to select DHCP range.   Generally recommended unless you have clients that need static IP addresses.  Connectify remembers IP ranges that it has encountered on other networks that this computer has been connected to, and never allows those ranges to be used in managed DHCP mode.  This makes the possibility of an IP conflict remote.
  • IP - Allows you to manually set the IP ranges that is used by DHCP.  Can either be 10.0.###.1 or 192.168.###.1, where ### is a number from 1 to 254 that you select. The final octet must be 1. 

See also  http://support.connectify.me/article/194-custom-dhcp-controls

startup

startup [never|always|resume]

Choose if Connectify Hotspot will start when your PC turns on.

  • "never" - Never restart
  • "always" - Always restart
  • "resume" - Restart if running prior to shutdown

Sample Output:

	{"res":true,"startup":"never"}

pause

pause [never|onnointernet]

Controls if the Hotspot will pause when there is no internet being shared and no devices are connected. The hotspot never pauses if 'No Interent Sharing' is chosen for the Internet To Share

  • ."never" - Do not pause
  • "onnointernet" - Pause when there is no internet and no clients are connected

Sample Output:

	{"res":true,"pause":"onnointernet"}

client

client ip|mac|hostname [--gaming never|auto|psn|xbl|nwc] [--internet on|off] [--local on|off]

Set firewall settings for a single client.

Sample Output:

	"res":true,"client":{"GamingModeType":0,"IP":"192.168.219.101","MacString":"b0:dc:24:09:83:12","SpeedKbpsDownload":0,"SpeedKbpsUpload":0,"StaticIP":null,"UsageBytesDownload":6183,"UsageBytesUpload":4990,"accessRights":{"Internet":true,"Local":true},"dateconnected":"2018-07-09T17:57:40.8324656Z","datefirstseen":"2018-04-24T15:56:59.2380286Z","displayName":"","hostname":"SAMSUNG-SM-G950U","icon":"os_murata.png","receivedSignalStrength":0,"secondsConnected":186,"state":1,"totalConnections":2,"userSetIcon":false,"vci":null,"vendor":"Murata Manufacturing Co., Ltd."}}

version

Outputs the current version of the installed Connectify Hotspot.

Sample Output:

C:\Program Files (x86)\Connectify>connectify_cli version

{"res":true,"version":"2016.0.4.37254"}

Still need help? Contact Us Contact Us