Socks (LD45) Mac OS

Posted on  by
Mac(LD45)

SOCKS is an Internet protocol that exchanges network packets between a client and server through a proxy server.SOCKS is an abbreviation of 'SOCKet Secure'. SOCKS5 optionally provides authentication so only authorized users may access a server. Practically, a SOCKS server proxies TCP connections to an arbitrary IP address, and provides a means for UDP packets to be forwarded.

Server = 127.0.0.1 #代理地址 servertype = 5 #5即socks代理 serverport = 8080 #代理端口 然后即可在命令行对任意软件应用代理 $ tsocks wget https://google.com. Just navigate to Quick Guide. Or plan to deploy your own server? Take one minute to complete a survey about shadowsocks user base.It's totally anonymous and no login required.

If you wish to connect to a Socket Secure (SOCKS) proxy server from a system running Apple's OS X operating system, you can do by taking the following steps:
  1. Click on the Apple icon at the top, left-hand corner of the screen andselect System Preferences.
  2. Click on Network.
  3. Select the network connection for which you wish touse a SOCKS proxy, e.g., Wi-Fi, by clicking on it.
  4. Click on the Advanced button.
  5. Click on the Proxies tab.
  6. Click on Socks Proxy to check the check box next to it and thenplace the IP address of the SOCKS proxy server in the Socks Proxy Serverfield. To the right of that field, separated by a colon, is the port field.Place the port number used for the SOCKS proxy connection in that field,e.g. 1080, which is the well-known port used for the SOCKS protocol, i.e., it is the commonlyused port for SOCKS connections, but not necessarily the one that has tobe used.
  7. Click on OK.

You can also change the proxy server setting, which is a system-widesetting, from within some browsers, e.g., Google Chrome, where you could take the following steps to get to theSOCKS proxy server settings window.

Socks (ld45) Mac Os Download

  1. Click on the 3 horizontal bars at the top, right-hand corner of the browser window to get a menu of options and select Settingsor hit the command and comma keys simultaneously to get to the Settings options.
  2. Click on 'Show advanced settings', which is at the bottom of the Settings page.
  3. Under the Network section, click on the 'Change proxy settings' button.

That will take you to the System Preferences window where you canchange the proxy server setting as you did above.

Alternatively, if you prefer to use a command line interface (CLI), such as you would get by running the Terminal application found in Applications/Utilities, you can use the networksetup command.You can use the networksetup -getsocksfirewallproxy networkservice command, where networkservice is a particular network service, such as Wi-Fi, to check the settings.

You can check which network services are available with the networksetup -listallnetworkservices command.

Socks (ld45) Mac Os X

E.g., I can check on whether a SOCKS proxy is being used and thesetting for the SOCKS proxy port on a MacBook Pro laptop's WiFi connection usingnetworksetup -getsocksfirewallproxy Wi-Fi.

In the example above, the SOCKS proxy is not being used, though theport is set to 1080 and the SOCKS proxy server IP address is the localhostaddress 127.0.0.1. If I had used an SSHconnection from the system with the -D option, e.g.ssh -D 1080 jdoe@example.com, to an SSH server to set up the SOCKS proxy then 127.0.0.1 is the address I would specify for the SOCKSserver, since it is set up on the local system and is tunneled over the SSH connection.

When it is enabled, you will see output similar to the following,if you check the SOCKS proxy state.

You will still see 'Enabled: No' for the web proxy state, even though theproxy server address and port may be set, if the network service is not configured currently to use a SOCKS proxy. If you are using a SOCKS proxy ratherthan an HTTP proxy as a proxyserver, you will see 'Enabled: No', if you specfy thegetwebproxy parameter rather than the getsocksfirewallproxy parameter.

If a SOCKS proxy server isn't being used and you have created a SOCKSproxy server with a tunneled SSH connection, you can enable its use withthe command shown below. Your account will need administrator-level accessand you will receive a password prompt where you can enter your account'spassword.

You would see the settings below, if you then checked the settingsthrough the graphical user interface (GUI) mechanism for viewing and changing thenetwork settings through System Preferences.

If I wanted to turn SOCKS proxy server support for the Wi-Fi connection off or on, I could use -setsocksfirewallproxystatenetworkservice on off. E.g.:

If you issue the above command without using sudo, a GUI window will appear prompting you to providethe credentials for an account with administrator access to thesystem to allow the change to occur.

To avoid that window appearing, put sudo in front of the command, so that the password prompt will appear on the command line.

If you then view the SOCKS proxy settings via the GUI interface provided fromthe Network option under System Settings, you would thensee the following:

Socks (ld45) Mac Os Catalina

Make sure you use -setsocksfirewallproxystate not-setsocksfirewallproxy, i.e., include the 'state' at the endof the command. If you mistakenly use the latter, you will be settingthe value for the 'SOCKS Proxy Server' field to 'off', instead of 127.0.0.1 or some other IP adddress or fully qualified domain name (FQDN). E.g., suppose I mistakenly issued the command below:

When I issued the networksetup -getsocksfirewallproxy command, I would seethe following:

If I then attempted to access a website in the browser, I wouldsee a message like 'Unable to connect to the proxy server', since the system is still configured to use a SOCKS proxy. If I then checked the SOCKS Proxy setting through System Preferences/Network, I would see the following:

The syntax for the setsocksfirewall proxy and setsocksfirewallproxystate options are shown below:

Socks (ld45) Mac Os 11

Note: tested on a MacBook Pro with OS X Yosemite (Version: 10.0.5)