{"info":{"_postman_id":"f587a4a1-d2ed-4d13-808c-450ce8f1f976","name":"Win2Socks API","description":"<html><head></head><body><p>The Win2Socks API allows users to control and manage Win2Socks Servers, Rules and DNS settings through HTTP requests. In this way, some special requirements can be implemented, such as: dynamically selecting different proxy servers for different instances (different process IDs) of the same program.</p>\n<p><strong>Note that don't forget to enable the API in the Win2Socks settings view before using the API.</strong></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"7534113","collectionId":"f587a4a1-d2ed-4d13-808c-450ce8f1f976","publishedId":"UVkpNazG","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-02-25T00:00:37.000Z"},"item":[{"name":"Servers","item":[{"name":"Get Servers","id":"c50ac618-18f6-422d-bae7-f8a365d28795","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:10102/api/servers","description":"<h5 id=\"summary\">Summary</h5>\n<p>Get all servers.</p>\n<h5 id=\"response\">Response</h5>\n<p>An array of <code>Server</code> objects. There are 4 types of <code>Server</code>: <code>HTTP</code>, <code>SOCKS5</code>, <code>Shadowsocks</code> and <code>Trojan</code>.</p>\n<p>All server types have some common fields, as well as some special fields for each.</p>\n<h6 id=\"server-common-fields\">Server Common Fields</h6>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Uid</td>\n<td>Unique ID for the <code>Server</code> object, which is unique while Win2Socks is running, but will change after Win2Socks exits and restarts.  <br />  <br />When you add a new <code>Server</code> through the API, the API will return a <code>Uid</code> representing the newly created <code>Server</code>.  <br />  <br />When you edit/replace an existing <code>Server</code>, the API will also return a new <code>Uid</code>, since edits are actually handled as replaces.</td>\n</tr>\n<tr>\n<td>Type</td>\n<td>The type of <code>Server</code>.</td>\n</tr>\n<tr>\n<td>Name</td>\n<td>Optional, the name of <code>Server</code>.</td>\n</tr>\n<tr>\n<td>Group</td>\n<td>Optional, group name for grouping.</td>\n</tr>\n<tr>\n<td>Host</td>\n<td>The hostname or IP address of <code>Server</code>.</td>\n</tr>\n<tr>\n<td>Port</td>\n<td>The port of <code>Server</code>.</td>\n</tr>\n</tbody>\n</table>\n</div><h6 id=\"http-and-socks5-special-fields\"><code>HTTP</code> and <code>SOCKS5</code> Special Fields</h6>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Authentication</td>\n<td>Optional. Indicates whether to use username and password for authentication. If not specified, it is equivalent to <code>false</code>.</td>\n</tr>\n<tr>\n<td>UserName</td>\n<td>Required when <code>Authentication</code> is <code>true</code>.</td>\n</tr>\n<tr>\n<td>Password</td>\n<td>Required when <code>Authentication</code> is <code>true</code>.</td>\n</tr>\n</tbody>\n</table>\n</div><h6 id=\"shadowsocks-special-fields\"><code>Shadowsocks</code> Special Fields</h6>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Password</td>\n<td>The password of Shadowsocks protocol.</td>\n</tr>\n<tr>\n<td>Cipher</td>\n<td>The encryption method of Shadowsocks protocol.  <br />  <br />Options: <code>rc4-md5</code>, <code>salsa20</code>, <code>chacha20</code>, <code>chacha20-ietf</code>, <code>aes-128-ctr</code>, <code>aes-192-ctr</code>, <code>aes-256-ctr</code>, <code>aes-128-cfb</code>, <code>aes-192-cfb</code>, <code>aes-256-cfb</code>, <code>bf-cfb</code>, <code>camellia-128-cfb</code>, <code>camellia-192-cfb</code>, <code>camellia-256-cfb</code>, <code>aes-128-gcm</code>, <code>aes-192-gcm</code>, <code>aes-256-gcm</code>, <code>chacha20-ietf-poly1305</code>, <code>xchacha20-ietf-poly1305</code>.</td>\n</tr>\n</tbody>\n</table>\n</div><p><code>Shadowsocks2022</code> Special Fields</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Password</td>\n<td>The password of Shadowsocks 2022 protocol.  <br />For example: <code>wMt1ey4i91S3oTfae1EZAZvkhg0m/m5hMwTg5EECWMA=</code></td>\n</tr>\n<tr>\n<td>Method</td>\n<td>The encryption method of Shadowsocks 2022 protocol.  <br />  <br />Options: <code>2022-blake3-aes-128-gcm</code>, <code>2022-blake3-aes-256-gcm</code>, <code>2022-blake3-chacha20-poly1305</code>.</td>\n</tr>\n</tbody>\n</table>\n</div><h6 id=\"trojan-special-fields\"><code>Trojan</code> Special Fields</h6>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Password</td>\n<td>The password of Trojan protocol.</td>\n</tr>\n<tr>\n<td>ServerNameIndication</td>\n<td>Optional. Used to specify a domain name when there are more than one on a server.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"http","port":"10102","path":["api","servers"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"8fd36f62-e6d0-44e6-b895-1246c52d8326","name":"Get Servers","originalRequest":{"method":"GET","header":[],"url":"http://localhost:10102/api/servers"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Expires","value":"Sat, 26 Jul 1997 05:00:00 GMT"},{"key":"Last-Modified","value":"Thu, 24 Feb 2022 16:45:20 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Content-Encoding","value":"gzip"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Server","value":"EmbedIO/3.4.3"},{"key":"Date","value":"Thu, 24 Feb 2022 16:45:20 GMT"},{"key":"Connection","value":"close"}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"[\n    {\n        \"Uid\": \"ed94d1d9-f8c3-4c42-8aa4-41c55d8d5cf4\",\n        \"Type\": \"HTTP\",\n        \"Name\": \"HTTP Example\",\n        \"Group\": \"API Example\",\n        \"Host\": \"httpexample.com\",\n        \"Port\": 8080,\n        \"Authentication\": true,\n        \"UserName\": \"admin\",\n        \"Password\": \"123456\"\n    },\n    {\n        \"Uid\": \"b46bfced-1454-4fcf-abab-e965fe9839ab\",\n        \"Type\": \"SOCKS5\",\n        \"Name\": \"SOCKS5 Example\",\n        \"Group\": \"API Example\",\n        \"Host\": \"socks5example.com\",\n        \"Port\": 1080,\n        \"Authentication\": true,\n        \"UserName\": \"admin\",\n        \"Password\": \"123456\"\n    },\n    {\n        \"Uid\": \"e79d34a0-aaf2-4f0a-9e1f-208a599d88c9\",\n        \"Type\": \"Shadowsocks\",\n        \"Name\": \"Shadowsocks Example\",\n        \"Group\": \"API Example\",\n        \"Host\": \"shadowsocksexample.com\",\n        \"Port\": 8888,\n        \"Password\": \"123456789\",\n        \"Cipher\": \"aes-256-gcm\"\n    },\n    {\n        \"Uid\": \"e2ab7d91-0f73-4460-9dd8-c327423fb973\",\n        \"Type\": \"Shadowsocks2022\",\n        \"Name\": \"SS 2022 Test\",\n        \"Group\": \"Test\",\n        \"Host\": \"ss2022example.com\",\n        \"Port\": 8888,\n        \"Password\": \"wMt1ey4i91S3oTfae1EZAZvkhg0m/m5hMwTg5EECWMA=\",\n        \"Method\": \"SS2022Blake3Aes256Gcm\"\n    },\n    {\n        \"Uid\": \"ccbbcf32-305f-4212-9993-ccb0736226a9\",\n        \"Type\": \"Trojan\",\n        \"Name\": \"Trojan Example\",\n        \"Group\": \"API Example\",\n        \"Host\": \"trojanexample.com\",\n        \"Port\": 443,\n        \"Password\": \"123456\",\n        \"ServerNameIndication\": \"trojanexample.com\"\n    }\n]"}],"_postman_id":"c50ac618-18f6-422d-bae7-f8a365d28795"},{"name":"Add Server","id":"57ef07a7-cc92-47db-ae70-2b820de98786","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{}},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"Type\": \"HTTP\",\r\n    \"Name\": \"HTTP Example\",\r\n    \"Group\": \"API Example\",\r\n    \"Host\": \"httpexample.com\",\r\n    \"Port\": 8080,\r\n    \"Authentication\": true,\r\n    \"UserName\": \"admin\",\r\n    \"Password\": \"123456\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:10102/api/servers","description":"<h5 id=\"summary\">Summary</h5>\n<p>Add a new <code>Server</code> to Win2Socks, see above tables for <code>Server</code> fields.</p>\n<h5 id=\"response\">Response</h5>\n<p>A <code>Uid</code> of added <code>Server</code>.</p>\n","urlObject":{"protocol":"http","port":"10102","path":["api","servers"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"54bc820a-cc51-4d49-aa6d-ed1a1698ca9c","name":"Add Server","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"Type\": \"HTTP\",\r\n    \"Name\": \"HTTP Example\",\r\n    \"Group\": \"API Example\",\r\n    \"Host\": \"httpexample.com\",\r\n    \"Port\": 8080,\r\n    \"Authentication\": true,\r\n    \"UserName\": \"admin\",\r\n    \"Password\": \"123456\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:10102/api/servers"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Expires","value":"Sat, 26 Jul 1997 05:00:00 GMT"},{"key":"Last-Modified","value":"Thu, 24 Feb 2022 20:24:09 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Location","value":"/api/servers/cfa9c25d-3dc8-410d-9a14-4f3002adf565"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Content-Encoding","value":"gzip"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Server","value":"EmbedIO/3.4.3"},{"key":"Date","value":"Thu, 24 Feb 2022 20:24:09 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"Uid\": \"cfa9c25d-3dc8-410d-9a14-4f3002adf565\"\n}"}],"_postman_id":"57ef07a7-cc92-47db-ae70-2b820de98786"},{"name":"Replace Server","id":"e552dbb6-1bb5-4284-839a-b9b0037258d7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"Type\": \"HTTP\",\r\n    \"Name\": \"HTTP Example Updated\",\r\n    \"Group\": \"API Example\",\r\n    \"Host\": \"httpexample.com\",\r\n    \"Port\": 8181,\r\n    \"Authentication\": true,\r\n    \"UserName\": \"nimda\",\r\n    \"Password\": \"654321\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:10102/api/servers/62ee38e0-daca-461f-99df-e05b38872c5f","description":"<h5 id=\"summary\">Summary</h5>\n<p>Post a new <code>Server</code> to replace existing <code>Server</code>. You can think of it as editing the <code>Server</code>, actually replacing the original with a new <code>Server</code> object, so you need to submit the full <code>Server</code> fields, not just the modified fields.</p>\n<p>Note that the <code>Uid</code> (<code>62ee38e0-daca-461f-99df-e05b38872c5f</code>) in the request path is the <code>Uid</code> of existing <code>Server</code> to replace.</p>\n<h5 id=\"response\">Response</h5>\n<p>A <code>Uid</code> of the new <code>Server</code>.</p>\n","urlObject":{"protocol":"http","port":"10102","path":["api","servers","62ee38e0-daca-461f-99df-e05b38872c5f"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"62c839ba-ddb8-463b-90d4-8b8607403031","name":"Replace Server","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"Type\": \"HTTP\",\r\n    \"Name\": \"HTTP Example Updated\",\r\n    \"Group\": \"API Example\",\r\n    \"Host\": \"httpexample.com\",\r\n    \"Port\": 8181,\r\n    \"Authentication\": true,\r\n    \"UserName\": \"nimda\",\r\n    \"Password\": \"654321\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:10102/api/servers/62ee38e0-daca-461f-99df-e05b38872c5f"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Expires","value":"Sat, 26 Jul 1997 05:00:00 GMT"},{"key":"Last-Modified","value":"Thu, 24 Feb 2022 20:56:24 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Content-Encoding","value":"gzip"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Server","value":"EmbedIO/3.4.3"},{"key":"Date","value":"Thu, 24 Feb 2022 20:56:24 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"Uid\": \"5686bbed-a50b-4c85-9ea8-c263551e3de1\"\n}"}],"_postman_id":"e552dbb6-1bb5-4284-839a-b9b0037258d7"},{"name":"Delete Server","id":"ebf64e1c-e056-4440-b310-ddc70746f08a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:10102/api/servers/1f6d809c-69e8-4dde-9c35-8aabdd276121","description":"<h5 id=\"summary\">Summary</h5>\n<p>Delete the existing <code>Server</code>.</p>\n<p>Note that the <code>Uid</code> (<code>1f6d809c-69e8-4dde-9c35-8aabdd276121</code>) in the request path is the <code>Uid</code> of existing <code>Server</code> to delete.</p>\n","urlObject":{"protocol":"http","port":"10102","path":["api","servers","1f6d809c-69e8-4dde-9c35-8aabdd276121"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"7f5b124b-5e8b-478b-ad04-6a4f3cbd6a4d","name":"Delete Server","originalRequest":{"method":"DELETE","header":[],"url":"http://localhost:10102/api/servers/1f6d809c-69e8-4dde-9c35-8aabdd276121"},"status":"No Content","code":204,"_postman_previewlanguage":"html","header":[{"key":"Expires","value":"Sat, 26 Jul 1997 05:00:00 GMT"},{"key":"Last-Modified","value":"Thu, 24 Feb 2022 21:21:34 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Type","value":"text/html; charset=utf-8"},{"key":"Server","value":"EmbedIO/3.4.3"},{"key":"Date","value":"Thu, 24 Feb 2022 21:21:34 GMT"},{"key":"Content-Length","value":"0"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"ebf64e1c-e056-4440-b310-ddc70746f08a"}],"id":"97c6f1dd-93dc-4bda-bd82-6876f7054155","description":"<p>Manage servers. Add, edit/replace or delete servers.</p>\n","_postman_id":"97c6f1dd-93dc-4bda-bd82-6876f7054155"},{"name":"Rules","item":[{"name":"Get Rules","id":"30728a15-5242-470d-b471-ca08de08496d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:10102/api/rules","description":"<h5 id=\"summary\">Summary</h5>\n<p>Get all rules.</p>\n<h5 id=\"response\">Response</h5>\n<p>An array of <code>Rule</code> objects.</p>\n<h6 id=\"rule-fields\"><code>Rule</code> fields</h6>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Uid</td>\n<td>Unique ID for the <code>Rule</code> object, which is unique while Win2Socks is running, but will change after Win2Socks exits and restarts.  <br />  <br />When you add a new <code>Rule</code> through the API, the API will return a <code>Uid</code> representing the newly created <code>Rule</code>.  <br />  <br />When you edit/replace an existing <code>Rule</code>, the API will also return a new <code>Uid</code>, since edits are actually handled as replaces.</td>\n</tr>\n<tr>\n<td>IsEnabled</td>\n<td>Indicates whether to enable the <code>Rule</code>.</td>\n</tr>\n<tr>\n<td>Name</td>\n<td>Optional, a custom <code>Rule</code> name.</td>\n</tr>\n<tr>\n<td>RuleAction</td>\n<td>Indicates what action to do for network traffic that matches the <code>Rule</code>.  <br />  <br />Options: <code>Direct</code>, <code>Block</code>, <code>Proxy</code></td>\n</tr>\n<tr>\n<td>ConditionTypes</td>\n<td>An array indicating which types of conditions are included in the <code>Rule</code>, and the order of various types of conditions.  <br />  <br />Options: <code>Application</code>, <code>ProcessId</code>, <code>Domain</code>, <code>GeoIP</code>, <code>Address</code>, <code>Port</code>, <code>Protocol</code></td>\n</tr>\n<tr>\n<td>Applications</td>\n<td>An array of application paths.  <br />  <br />Required when <code>ConditionTypes</code> contains <code>Application</code> condition.</td>\n</tr>\n<tr>\n<td>ProcessIdSet</td>\n<td>An object contains a path of application and a list of process id of its different instances. See the example response to understand the <code>ProcessIdSet</code> object structure.  <br />  <br />Required when <code>ConditionTypes</code> contains <code>ProcessId</code> condition.</td>\n</tr>\n<tr>\n<td>Domains</td>\n<td>An array of domains.  <br />  <br />Required when <code>ConditionTypes</code> contains <code>Domain</code> condition.</td>\n</tr>\n<tr>\n<td>GeoCodeSet</td>\n<td>An object contains a bool field <code>BelongsOrNot</code> and a list of GEO code <code>Codes</code>. See the example response to understand the <code>GeoCodeSet</code> object structure.  <br />  <br />Required when <code>ConditionTypes</code> contains <code>GeoIP</code> condition.</td>\n</tr>\n<tr>\n<td>Addresses</td>\n<td>An array of IP addresses or CIDR.  <br />  <br />Required when <code>ConditionTypes</code> contains <code>Address</code> condition.</td>\n</tr>\n<tr>\n<td>Ports</td>\n<td>An array of ports or port-ranges.  <br />  <br />Required when <code>ConditionTypes</code> contains <code>Port</code> condition.</td>\n</tr>\n<tr>\n<td>Protocol</td>\n<td>Optional. Indicates whether the TCP, UDP protocol or both should be matched. If not specified, both TCP and UDP will be matched by default.  <br />  <br />Options: <code>Tcp</code>, <code>Udp</code>, <code>TcpUdp</code></td>\n</tr>\n<tr>\n<td>TargetServerUid</td>\n<td>The <code>Uid</code> of <code>Server</code> object. Indicates which proxy server should be used to forward network data matching this rule.  <br />  <br />Required when <code>RuleAction</code> is <code>Proxy</code>.</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"http","port":"10102","path":["api","rules"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"fdd48448-6d63-470f-94bd-1bfecf2743ca","name":"Get Rules","originalRequest":{"method":"GET","header":[],"url":"http://localhost:10102/api/rules"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Expires","value":"Sat, 26 Jul 1997 05:00:00 GMT"},{"key":"Last-Modified","value":"Thu, 24 Feb 2022 22:26:37 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Content-Encoding","value":"gzip"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Server","value":"EmbedIO/3.4.3"},{"key":"Date","value":"Thu, 24 Feb 2022 22:26:37 GMT"},{"key":"Connection","value":"close"}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":"[\n    {\n        \"Uid\": \"c94cd342-8ca1-437d-89e2-f32dd0509c0f\",\n        \"IsEnabled\": true,\n        \"Name\": \"Application Example\",\n        \"RuleAction\": \"Proxy\",\n        \"ConditionTypes\": [\n            \"Application\"\n        ],\n        \"Applications\": [\n            \"C:\\\\Program Files\\\\Microsoft Visual Studio\\\\2022\\\\Community\\\\Common7\\\\IDE\\\\devenv.exe\"\n        ],\n        \"Protocol\": 0,\n        \"TargetServerUid\": \"ccc29150-10d4-4872-9b26-23f9e2266bca\"\n    },\n    {\n        \"Uid\": \"8f11258f-2576-41a3-bb81-92c1771bb27c\",\n        \"IsEnabled\": true,\n        \"Name\": \"Process ID Example\",\n        \"RuleAction\": \"Proxy\",\n        \"ConditionTypes\": [\n            \"ProcessId\"\n        ],\n        \"ProcessIdSet\": {\n            \"Application\": \"C:\\\\Program Files\\\\Microsoft Visual Studio\\\\2022\\\\Community\\\\Common7\\\\IDE\\\\devenv.exe\",\n            \"ProcessIds\": [\n                13596,\n                15457\n            ]\n        },\n        \"Protocol\": 0,\n        \"TargetServerUid\": \"5ba06894-ab00-4f97-8f30-17a3c1c55d06\"\n    },\n    {\n        \"Uid\": \"5c325a9d-07cf-4bab-b008-d05343a031b8\",\n        \"IsEnabled\": true,\n        \"Name\": \"Domain Example\",\n        \"RuleAction\": \"Proxy\",\n        \"ConditionTypes\": [\n            \"Domain\"\n        ],\n        \"Domains\": [\n            \"example.com\",\n            \"google.com\",\n            \"youtube.com\"\n        ],\n        \"Protocol\": 0,\n        \"TargetServerUid\": \"ccc29150-10d4-4872-9b26-23f9e2266bca\"\n    },\n    {\n        \"Uid\": \"658353d2-30e7-4bfa-a20b-c9fbf294ddff\",\n        \"IsEnabled\": true,\n        \"Name\": \"Non-CN IP\",\n        \"RuleAction\": \"Proxy\",\n        \"ConditionTypes\": [\n            \"GeoIP\"\n        ],\n        \"GeoCodeSet\": {\n            \"BelongsOrNot\": false,\n            \"Codes\": [\n                \"CN\"\n            ]\n        },\n        \"Protocol\": 0,\n        \"TargetServerUid\": \"ccc29150-10d4-4872-9b26-23f9e2266bca\"\n    },\n    {\n        \"Uid\": \"91be4026-af89-483e-827a-e7534d262e28\",\n        \"IsEnabled\": true,\n        \"Name\": \"Address Example\",\n        \"RuleAction\": \"Proxy\",\n        \"ConditionTypes\": [\n            \"Address\"\n        ],\n        \"Addresses\": [\n            \"64.233.160.1\",\n            \"2600:1901:101::8\",\n            \"108.177.16.0/24\",\n            \"2600:1901:101::10/126\"\n        ],\n        \"Protocol\": 0,\n        \"TargetServerUid\": \"ccc29150-10d4-4872-9b26-23f9e2266bca\"\n    },\n    {\n        \"Uid\": \"5a964250-d10e-4d45-9eb8-4ad5a59cdec6\",\n        \"IsEnabled\": true,\n        \"Name\": \"Port Example\",\n        \"RuleAction\": \"Proxy\",\n        \"ConditionTypes\": [\n            \"Port\"\n        ],\n        \"Ports\": [\n            \"80\",\n            \"443\",\n            \"8080-10000\"\n        ],\n        \"Protocol\": 0,\n        \"TargetServerUid\": \"ccc29150-10d4-4872-9b26-23f9e2266bca\"\n    },\n    {\n        \"Uid\": \"73999589-7e57-4e37-ad3d-85d7e08bbbef\",\n        \"IsEnabled\": true,\n        \"Name\": \"Protocol Example\",\n        \"RuleAction\": \"Proxy\",\n        \"ConditionTypes\": [\n            \"Protocol\"\n        ],\n        \"Protocol\": \"Udp\",\n        \"TargetServerUid\": \"ccc29150-10d4-4872-9b26-23f9e2266bca\"\n    },\n    {\n        \"Uid\": \"6814b5e4-6395-4c60-a1aa-e1564d00eec7\",\n        \"IsEnabled\": true,\n        \"Name\": \"Complex Condition Example\",\n        \"RuleAction\": \"Proxy\",\n        \"ConditionTypes\": [\n            \"Application\",\n            \"Protocol\",\n            \"Port\",\n            \"Domain\"\n        ],\n        \"Applications\": [\n            \"C:\\\\Program Files\\\\Microsoft Visual Studio\\\\2022\\\\Community\\\\Common7\\\\IDE\\\\devenv.exe\"\n        ],\n        \"Domains\": [\n            \"microsoft.com\"\n        ],\n        \"Ports\": [\n            \"80\",\n            \"443\"\n        ],\n        \"Protocol\": \"Tcp\",\n        \"TargetServerUid\": \"ccc29150-10d4-4872-9b26-23f9e2266bca\"\n    }\n]"}],"_postman_id":"30728a15-5242-470d-b471-ca08de08496d"},{"name":"Add Rule","id":"f874c97b-9fef-4620-9422-ab9573235400","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n        \"IsEnabled\": true,\r\n        \"Name\": \"Add Rule Example\",\r\n        \"RuleAction\": \"Proxy\",\r\n        \"ConditionTypes\": [\r\n            \"ProcessId\"\r\n        ],\r\n        \"ProcessIdSet\": {\r\n            \"Application\": \"C:\\\\Program Files\\\\Microsoft Visual Studio\\\\2022\\\\Community\\\\Common7\\\\IDE\\\\devenv.exe\",\r\n            \"ProcessIds\": [\r\n                13596,\r\n                15457\r\n            ]\r\n        },\r\n        \"TargetServerUid\": \"5ba06894-ab00-4f97-8f30-17a3c1c55d06\"\r\n    }","options":{"raw":{"language":"json"}}},"url":"http://localhost:10102/api/rules","description":"<h5 id=\"summary\">Summary</h5>\n<p>Add a new <code>Rule</code> to Win2Socks, see above table for <code>Rule</code> fields.</p>\n<h5 id=\"response\">Response</h5>\n<p>A <code>Uid</code> of added <code>Rule</code>.</p>\n","urlObject":{"protocol":"http","port":"10102","path":["api","rules"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"f99a4b84-925a-4a7b-945c-3552e9fa4a18","name":"Add Rule","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"IsEnabled\": true,\r\n    \"Name\": \"Add Rule Example\",\r\n    \"RuleAction\": \"Proxy\",\r\n    \"ConditionTypes\": [\r\n        \"ProcessId\"\r\n    ],\r\n    \"ProcessIdSet\": {\r\n        \"Application\": \"C:\\\\Program Files\\\\Microsoft Visual Studio\\\\2022\\\\Community\\\\Common7\\\\IDE\\\\devenv.exe\",\r\n        \"ProcessIds\": [\r\n            13596,\r\n            15457\r\n        ]\r\n    },\r\n    \"TargetServerUid\": \"5ba06894-ab00-4f97-8f30-17a3c1c55d06\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:10102/api/rules"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Expires","value":"Sat, 26 Jul 1997 05:00:00 GMT"},{"key":"Last-Modified","value":"Thu, 24 Feb 2022 23:14:07 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Content-Encoding","value":"gzip"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Server","value":"EmbedIO/3.4.3"},{"key":"Date","value":"Thu, 24 Feb 2022 23:14:07 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"Uid\": \"4ef48393-6edf-4c60-9197-c2744cd8e0f0\"\n}"}],"_postman_id":"f874c97b-9fef-4620-9422-ab9573235400"},{"name":"Replace Rule","id":"c8c8bc6b-0ef3-465c-b421-b0a40a1c1c26","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n        \"IsEnabled\": true,\r\n        \"Name\": \"Replace Rule Example\",\r\n        \"RuleAction\": \"Proxy\",\r\n        \"ConditionTypes\": [\r\n            \"ProcessId\"\r\n        ],\r\n        \"ProcessIdSet\": {\r\n            \"Application\": \"C:\\\\Program Files\\\\Microsoft Visual Studio\\\\2022\\\\Community\\\\Common7\\\\IDE\\\\devenv.exe\",\r\n            \"ProcessIds\": [\r\n                11111\r\n            ]\r\n        },\r\n        \"TargetServerUid\": \"5ba06894-ab00-4f97-8f30-17a3c1c55d06\"\r\n    }","options":{"raw":{"language":"json"}}},"url":"http://localhost:10102/api/rules/a3513b11-3643-407b-80da-730edda57537","description":"<h5 id=\"summary\">Summary</h5>\n<p>Post a new <code>Rule</code> to replace existing <code>Rule</code>. You can think of it as editing the <code>Rule</code>, actually replacing the original with a new <code>Rule</code> object, so you need to submit the full <code>Rule</code> fields, not just the modified fields.</p>\n<p>Note that the <code>Uid</code> (<code>a3513b11-3643-407b-80da-730edda57537</code>) in the request path is the <code>Uid</code> of existing <code>Rule</code> to replace.</p>\n<h5 id=\"response\">Response</h5>\n<p>A <code>Uid</code> of the new <code>Rule</code>.</p>\n","urlObject":{"protocol":"http","port":"10102","path":["api","rules","a3513b11-3643-407b-80da-730edda57537"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"3ef83dca-2ca0-4868-8849-abbfaff07ca3","name":"Replace Rule","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"IsEnabled\": true,\r\n    \"Name\": \"Replace Rule Example\",\r\n    \"RuleAction\": \"Proxy\",\r\n    \"ConditionTypes\": [\r\n        \"ProcessId\"\r\n    ],\r\n    \"ProcessIdSet\": {\r\n        \"Application\": \"C:\\\\Program Files\\\\Microsoft Visual Studio\\\\2022\\\\Community\\\\Common7\\\\IDE\\\\devenv.exe\",\r\n        \"ProcessIds\": [\r\n            11111\r\n        ]\r\n    },\r\n    \"TargetServerUid\": \"5ba06894-ab00-4f97-8f30-17a3c1c55d06\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:10102/api/rules/a3513b11-3643-407b-80da-730edda57537"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Expires","value":"Sat, 26 Jul 1997 05:00:00 GMT"},{"key":"Last-Modified","value":"Thu, 24 Feb 2022 23:22:03 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Content-Encoding","value":"gzip"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Server","value":"EmbedIO/3.4.3"},{"key":"Date","value":"Thu, 24 Feb 2022 23:22:03 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"Uid\": \"9c38d3a6-15d4-43ae-a450-a96e83adf056\"\n}"}],"_postman_id":"c8c8bc6b-0ef3-465c-b421-b0a40a1c1c26"},{"name":"Move Rule","id":"4ac520f9-393a-41f0-824e-388e39d67567","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"url":"http://localhost:10102/api/rules/c94cd342-8ca1-437d-89e2-f32dd0509c0f?index=0","description":"<h5 id=\"summary\">Summary</h5>\n<p>Moves an existing <code>Rule</code> to the position specified by the query parameter <code>index</code>. <code>index</code> starts from 0.</p>\n<p>Note that the <code>Uid</code> (<code>c94cd342-8ca1-437d-89e2-f32dd0509c0f</code>) in the request path is the <code>Uid</code> of existing <code>Rule</code> to move.</p>\n","urlObject":{"protocol":"http","port":"10102","path":["api","rules","c94cd342-8ca1-437d-89e2-f32dd0509c0f"],"host":["localhost"],"query":[{"key":"index","value":"0"}],"variable":[]}},"response":[{"id":"29388a1f-85fd-4590-b3b4-6efd3ccec9e8","name":"Move Rule","originalRequest":{"method":"PUT","header":[],"url":{"raw":"http://localhost:10102/api/rules/c94cd342-8ca1-437d-89e2-f32dd0509c0f?index=0","protocol":"http","host":["localhost"],"port":"10102","path":["api","rules","c94cd342-8ca1-437d-89e2-f32dd0509c0f"],"query":[{"key":"index","value":"0"}]}},"status":"OK","code":200,"_postman_previewlanguage":"html","header":[{"key":"Expires","value":"Sat, 26 Jul 1997 05:00:00 GMT"},{"key":"Last-Modified","value":"Thu, 24 Feb 2022 23:29:46 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Type","value":"text/html; charset=utf-8"},{"key":"Server","value":"EmbedIO/3.4.3"},{"key":"Date","value":"Thu, 24 Feb 2022 23:29:46 GMT"},{"key":"Content-Length","value":"0"},{"key":"Connection","value":"close"}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":""}],"_postman_id":"4ac520f9-393a-41f0-824e-388e39d67567"},{"name":"Delete Rule","id":"d1115831-9699-40bd-acbf-a2366171512b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:10102/api/rules/4ef48393-6edf-4c60-9197-c2744cd8e0f0","description":"<h5 id=\"summary\">Summary</h5>\n<p>Delete the existing <code>Rule</code>.</p>\n<p>Note that the <code>Uid</code> (<code>4ef48393-6edf-4c60-9197-c2744cd8e0f0</code>) in the request path is the <code>Uid</code> of existing <code>Rule</code> to delete.</p>\n","urlObject":{"protocol":"http","port":"10102","path":["api","rules","4ef48393-6edf-4c60-9197-c2744cd8e0f0"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"4ba54729-f34c-4e9d-8b50-42b0ebee0903","name":"Delete Rule","originalRequest":{"method":"DELETE","header":[],"url":"http://localhost:10102/api/rules/4ef48393-6edf-4c60-9197-c2744cd8e0f0"},"status":"No Content","code":204,"_postman_previewlanguage":"html","header":[{"key":"Expires","value":"Sat, 26 Jul 1997 05:00:00 GMT"},{"key":"Last-Modified","value":"Thu, 24 Feb 2022 23:32:03 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Type","value":"text/html; charset=utf-8"},{"key":"Server","value":"EmbedIO/3.4.3"},{"key":"Date","value":"Thu, 24 Feb 2022 23:32:03 GMT"},{"key":"Content-Length","value":"0"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"d1115831-9699-40bd-acbf-a2366171512b"}],"id":"d64a1229-f579-437b-8bc3-23a76fc28c5a","description":"<p>Manage rules. Add, edit/replace, move or delete rules.</p>\n","_postman_id":"d64a1229-f579-437b-8bc3-23a76fc28c5a"},{"name":"DNS","item":[{"name":"Get DNS Address","id":"41fe8361-7e07-4cc8-a9fa-d3308f15b7a8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:10102/api/dns","description":"<h5 id=\"summary\">Summary</h5>\n<p>Get the DNS servers currently using by Win2Socks.</p>\n<h5 id=\"response\">Response</h5>\n<p>IP addresses of DNS servers.</p>\n","urlObject":{"protocol":"http","port":"10102","path":["api","dns"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"6c935b4b-5b99-40c5-b4f3-b8f14879cfdf","name":"Get DNS Address","originalRequest":{"method":"GET","header":[],"url":"http://localhost:10102/api/dns"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Expires","value":"Sat, 26 Jul 1997 05:00:00 GMT"},{"key":"Last-Modified","value":"Fri, 20 May 2022 06:29:07 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Content-Encoding","value":"gzip"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Server","value":"EmbedIO/3.4.3"},{"key":"Date","value":"Fri, 20 May 2022 06:29:07 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"Address\": \"223.5.5.5\",\n    \"AddressV6\": \"2400:3200::1\"\n}"}],"_postman_id":"41fe8361-7e07-4cc8-a9fa-d3308f15b7a8"},{"name":"Set DNS Address","id":"49ca1681-586b-44d8-b335-8ef564a22f22","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"Address\": \"8.8.8.8\",\r\n    \"AddressV6\": \"2001:4860:4860::8888\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:10102/api/dns","description":"<h5 id=\"summary\">Summary</h5>\n<p>Set DNS servers for Win2Socks.</p>\n<p>If you do not post anything, in other words, post an empty body, Win2Socks will use the system default DNS server immediately.</p>\n","urlObject":{"protocol":"http","port":"10102","path":["api","dns"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"85927c38-8237-4975-9268-f91e7169772a","name":"Set DNS Address","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"Address\": \"8.8.8.8\",\r\n    \"AddressV6\": \"2001:4860:4860::8888\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:10102/api/dns"},"status":"No Content","code":204,"_postman_previewlanguage":"html","header":[{"key":"Expires","value":"Sat, 26 Jul 1997 05:00:00 GMT"},{"key":"Last-Modified","value":"Fri, 20 May 2022 06:29:57 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Type","value":"text/html; charset=utf-8"},{"key":"Server","value":"EmbedIO/3.4.3"},{"key":"Date","value":"Fri, 20 May 2022 06:29:57 GMT"},{"key":"Content-Length","value":"0"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"49ca1681-586b-44d8-b335-8ef564a22f22"}],"id":"6d5b6fb3-83ab-4e5a-a69a-c85817ae4d7c","_postman_id":"6d5b6fb3-83ab-4e5a-a69a-c85817ae4d7c","description":""},{"name":"State","item":[{"name":"Apply Changes","id":"1b831fa3-297f-44e5-a03b-e2c1e239b026","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"Action\": \"Apply\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:10102/api/state","urlObject":{"protocol":"http","port":"10102","path":["api","state"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"736a55a2-1583-4064-8c75-e3182ef4bc23","name":"Apply Changes","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"Action\": \"Apply\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:10102/api/state"},"status":"No Content","code":204,"_postman_previewlanguage":"html","header":[{"key":"Expires","value":"Sat, 26 Jul 1997 05:00:00 GMT"},{"key":"Last-Modified","value":"Thu, 24 Feb 2022 23:57:21 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Type","value":"text/html; charset=utf-8"},{"key":"Server","value":"EmbedIO/3.4.3"},{"key":"Date","value":"Thu, 24 Feb 2022 23:57:21 GMT"},{"key":"Content-Length","value":"0"},{"key":"Connection","value":"close"}],"cookie":[{"expires":"Invalid Date","domain":"","path":""}],"responseTime":null,"body":""}],"_postman_id":"1b831fa3-297f-44e5-a03b-e2c1e239b026"}],"id":"b3c73fb6-642c-409d-8d6b-151c3d8938d7","description":"<h5 id=\"summary\">Summary</h5>\n<p>Make all Servers and Rules changes effective immediately. This is equivalent to clicking the \"Apply Changes\" button in Win2Socks.</p>\n","_postman_id":"b3c73fb6-642c-409d-8d6b-151c3d8938d7"}],"event":[{"listen":"prerequest","script":{"id":"ba8bc0a1-621c-4b5a-a147-e1ce43f8657c","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"296e11fe-0293-40a0-913d-d9fe78d7f604","type":"text/javascript","exec":[""]}}],"variable":[{"key":"Host","value":"localhost","type":"string"},{"key":"Port","value":"10102","type":"string"}]}