1"use strict";(self.webpackChunkKatalon_Docs=self.webpackChunkKatalon_Docs||[]).push([[7141],{2570:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>x,frontMatter:()=>a,metadata:()=>t,toc:()=>p});const t=JSON.parse('{"id":"get-started/workspace-settings/katalon-studio-preferences/configure-proxy-preferences-in-katalon-studio","title":"Configure Proxy Preferences in Katalon Studio","description":"In Katalon Studio, there are two proxy categories: Authentication and System proxies. You can apply different proxy configurations for connecting to the Katalon server and your servers during testing.","source":"@site/docs/katalon-studio/get-started/workspace-settings/katalon-studio-preferences/configure-proxy-preferences-in-katalon-studio.md","sourceDirName":"get-started/workspace-settings/katalon-studio-preferences","slug":"/get-started/workspace-settings/katalon-studio-preferences/configure-proxy-preferences-in-katalon-studio","permalink":"/katalon-studio/get-started/workspace-settings/katalon-studio-preferences/configure-proxy-preferences-in-katalon-studio","draft":false,"unlisted":false,"tags":[],"version":"current","lastUpdatedAt":1778734869000,"frontMatter":{"title":"Configure Proxy Preferences in Katalon Studio"},"sidebar":"katalon-studio","previous":{"title":"Import Preferences to Katalon Studio","permalink":"/katalon-studio/get-started/workspace-settings/katalon-studio-preferences/import-preferences-to-katalon-studio"},"next":{"title":"Test Case Preferences in Katalon Studio","permalink":"/katalon-studio/get-started/workspace-settings/katalon-studio-preferences/test-case-preferences-in-katalon-studio"}}');var o=s(74848),r=s(28453),i=s(86025);const a={title:"Configure Proxy Preferences in Katalon Studio"},l=void 0,c={},p=[{value:"Proxy configuration options",id:"proxy-configuration-options",level:2},{value:'<a class="anchor_top_offset"></a>Use desired capabilities to set different proxy settings',id:"use-desired-capabilities-to-set-different-proxy-settings",level:2},{value:'<a class="anchor_top_offset"></a>Override proxy details in the test script',id:"override-proxy-details-in-the-test-script",level:2}];function d(e){const n={code:"code",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:["In ",(0,o.jsx)("span",{className:"ph",children:"Katalon Studio"}),", there are two proxy categories: Authentication and System proxies. You can apply different proxy configurations for connecting to the Katalon server and your servers during testing."]}),"\n",(0,o.jsxs)("div",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:["To access Proxy preferences, go to ",(0,o.jsxs)("span",{className:"ph menucascade",children:[(0,o.jsx)("span",{className:"ph uicontrol",children:"Katalon Studio"}),(0,o.jsx)("abbr",{title:"and then",children:" > "}),(0,o.jsx)("span",{className:"ph uicontrol",children:"Preferences"}),(0,o.jsx)("abbr",{title:"and then",children:" > "}),(0,o.jsx)("span",{className:"ph uicontrol",children:"Katalon"}),(0,o.jsx)("abbr",{title:"and then",children:" > "}),(0,o.jsx)("span",{className:"ph uicontrol",children:"Proxy"})," (Katalon Studio > Settings... > Katalon > Proxy for macOS)"]}),". Select the ",(0,o.jsx)("span",{className:"ph uicontrol",children:"Authentication"})," or ",(0,o.jsx)("span",{className:"ph uicontrol",children:"System"})," section for the corresponding proxy configuration.",(0,o.jsxs)("ul",{className:"ul",children:[(0,o.jsx)("li",{className:"li",children:(0,o.jsxs)("p",{className:"p",children:["Authentication proxy configurations: used for authenticating with Katalon Authentication servers. This affects account authentication, ",(0,o.jsx)("span",{className:"ph",children:"Katalon True Platform"}),", ",(0,o.jsx)("span",{className:"ph",children:"Test Execution - Cloud"}),", Store integration, the Katalon auto-updater, WebDriver auto-updater, sample projects providers, and more."]})}),(0,o.jsx)("li",{className:"li",children:(0,o.jsxs)("p",{className:"p",children:["System proxy configurations: applies to other network\nconnections generated
1when using ",(0,o.jsx)("span",{className:"ph",children:"Katalon Studio"}),", including but not\nlimited to recording, spying, executing tests, integrating with\nother tools, and downloading Web Drivers or Android SDK."]})})]})]}),"\n",(0,o.jsx)(n.h2,{id:"proxy-configuration-options",children:"Proxy configuration options"}),"\n",(0,o.jsxs)(n.p,{children:["In both the\xa0",(0,o.jsx)(n.strong,{children:"Authentication"}),"\xa0and\xa0",(0,o.jsx)(n.strong,{children:"System"}),"\xa0Proxy options, select one of the three options below."]}),"\n",(0,o.jsx)("img",{src:"https://docs.katalon.com/9bd1c3a0-28e9-11ed-9930-0242fe3e4a3f/ks-850-proxy-option.png",alt:"KS - Preferences System",width:"700"}),"\n",(0,o.jsx)("br",{}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"No proxy"}),": Connect directly without proxy."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Use system proxy configuration"}),": Katalon Studio guesses which proxy server your system is behind by checking Java, browser and operating system settings, and environment variables."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Manual proxy configuration"}),": Manually set up your proxy with the following settings:","\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Address: A Proxy server host."}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Port: A Proxy server port."}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Excludes: A list of addresses separated by commas. Enter the beginning or the ending of the address in the list (e.g,",(0,o.jsx)(n.code,{children:".192.168.*"}),", ",(0,o.jsx)(n.code,{children:".katalon.com"}),")"]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Note"}),": Katalon Studio\xa0only supports proxy exceptions in web recorder and spy utilities with Chrome and Firefox."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(n.h2,{id:"use-desired-capabilities-to-set-different-proxy-settings",children:[(0,o.jsx)("a",{id:"task-8122",class:"anchor_top_offset"}),"Use desired capabilities to set different proxy settings"]}),"\n",(0,o.jsxs)("section",{xmlns:"http://www.w3.org/1999/xhtml",className:"section context",children:[(0,o.jsx)("span",{className:"ph",children:"Katalon Studio"})," applies the system proxy to the desired capabilities of a test execution on the instance automatically. ",(0,o.jsxs)("p",{className:"p",children:["If you want to configure different proxy settings depending on your projects, you can use ",(0,o.jsx)("span",{className:"ph uicontrol",children:"Desired Capabilities"})," as follows:"]})," "]}),"\n",(0,o.jsxs)("ol",{xmlns:"http://www.w3.org/1999/xhtml",className:"ol steps",children:[(0,o.jsx)("li",{className:"li step stepexpand",children:(0,o.jsxs)("span",{className:"ph cmd",children:["Open your project and go to ",(0,o.jsxs)("span",{className:"ph menucascade",children:[(0,o.jsx)("span",{className:"ph uicontrol",children:"Katalon Studio"}),(0,o.jsx)("abbr",{title:"and then",children:" > "}),(0,o.jsx)("span",{className:"ph uicontrol",children:"Preferences"}),(0,o.jsx)("abbr",{title:"and then",children:" > "}),(0,o.jsx)("span",{className:"ph uicontrol",children:"Katalon"}),(0,o.jsx)("abbr",{title:"and then",children:" > "}),(0,o.jsx)("span",{className:"ph uicontrol",children:"Proxy"}),(0,o.jsx)("abbr",{title:"and then",children:" > "}),(0,o.jsx)("span",{className:"ph uicontrol",children:"System"})]})," (Katalon Studio > Settings... > Katalon > Proxy > System for macOS)."]})}),(0,o.jsxs)("li",{className:"li step stepexpand",children:[(0,o.jsxs)("span",{className:"ph cmd",children:["At the bottom of the displayed view, uncheck the ",(0,o.jsx)("span",{className:"ph uicontrol",children:"Auto-apply to test execution desired capabilities"})," option."]}),(0,o.jsx)("div",{className:"itemgroup stepxmp",children:(0,o.jsx)("img",{className:"image",width:700,src:(0,i.Ay)("/6eee4fd0-a2dc-11ed-998d-0242cfbc79b5/ks-proxy-setting-uncheck.png"),alt:"Uncheck the Auto-apply to test execution desired capabilities at the end of the Proxy System setting"})})]}),(0,o.jsx)("li",{className:"li step stepexpand",children:(0,o.jsxs)("span",{className:"ph cmd",children:["Click ",(0,o.jsx)("span",{className:"ph uicontrol",children:"Apply"})," to save."]})}),(0,o.jsx)("li",{className:"li step stepexpand",children:(0,o.jsxs)("span",{className:"ph cmd",children:["Go to ",(0,o.jsxs)("span",{className:"ph menucascade",children:[(0,o.jsx)("span",{className:"ph uicontrol",children:"Project"}),(0,o.jsx)("abbr",{title:"and then",children:" > "}),(0,o.jsx)("span",{className:"ph uicontrol",children:"Settings"}),(0,o.jsx)("abbr",{title:"and then",children:" > "}),(0,o.jsx)("span",{className:"ph uicontrol",children:"Desired Capabilities"})]})," and select a testing environment."]})}),(0,o.jsxs)("li",{className:"li step stepexpand",children:[(0,o.jsx)("span",{className:"ph cmd",children:"Specify the proxy details. For example:"}),(0,o.jsx)("div",{className:"itemgroup stepxmp",children:(0,o.jsx)("img",{className:"image",width:700,src:(0,i.Ay)("/6ed1ee30-a2dc-11ed-998d-0242cfbc79b5/proxy-project-settings.png"),alt:"Specify proxy details in Project settings"})})]}),(0,o.jsx)("li",{className:"li step stepexpand",children:(0,o.jsxs)("span",{className:"ph cmd",children:[" Click ",(0,o.jsx)("span",{className:"ph uicontrol",children:"Apply & Close"}),"."]})})]}
1),"\n",(0,o.jsxs)(n.h2,{id:"override-proxy-details-in-the-test-script",children:[(0,o.jsx)("a",{id:"id_5",class:"anchor_top_offset"}),"Override proxy details in the test script"]}),"\n",(0,o.jsxs)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:[(0,o.jsx)("span",{className:"ph",children:"Katalon Studio"})," supports an option to pass proxy details via a request object in Web Service testing."]}),"\n",(0,o.jsxs)("div",{xmlns:"http://www.w3.org/1999/xhtml",className:"note note note_note",children:[(0,o.jsx)("span",{className:"note__title",children:"Note:"})," ",(0,o.jsx)("ul",{className:"ul",children:(0,o.jsxs)("li",{className:"li",children:["The proxy information passed in the request object overrides the proxy information in ",(0,o.jsx)("span",{className:"ph uicontrol",children:"Proxy Preferences"}),"."]})})]}),"\n",(0,o.jsxs)("div",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:["See the example below: ",(0,o.jsx)("pre",{className:"pre codeblock",children:(0,o.jsxs)("code",{children:['RequestObject requestObject = findTestObject("google")',"\n","ProxyInformation proxyInfo = new ProxyInformation();","\n",'proxyInfo.setProxyServerAddress("localhost")',"\n","proxyInfo.setProxyServerPort(8001)","\n","proxyInfo.setProxyOption(ProxyOption.MANUAL_CONFIG.toString())","\n","proxyInfo.setProxyServerType(ProxyServerType.HTTP.toString())","\n","requestObject.setProxy(proxyInfo)"]})})," "]}),"\n",(0,o.jsx)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:"Another workaround to override proxy details in script mode is to get your current proxy format, then pass your new proxy information in."}),"\n",(0,o.jsx)("p",{xmlns:"http://www.w3.org/1999/xhtml",className:"p",children:"See the example below:"}),"\n",(0,o.jsx)("pre",{xmlns:"http://www.w3.org/1999/xhtml",className:"pre codeblock",children:(0,o.jsxs)("code",{children:["import com.google.gson.Gson ","\n","import com.kms.katalon.core.configuration.RunConfiguration ","\n","import com.kms.katalon.core.network.ProxyInformation ","\n","import com.kms.katalon.core.network.ProxyOption","\n","\n","// Get current proxy information ","\n","ProxyInformation proxy = RunConfiguration.getProxyInformation() ","\n","println(proxy)","\n","\n","// Switch proxy ","\n","proxy.setProxyOption(ProxyOption.MANUAL_CONFIG.name()) ","\n",'proxy.setProxyServerAddress("127.0.0.1") ',"\n","proxy.setProxyServerPort(8082) ","\n","Map<String, Object> generalProperties = RunConfiguration.getExecutionGeneralProperties(); ","\n","generalProperties.put(RunConfiguration.PROXY_PROPERTY, new Gson().toJson(proxy)); ","\n","println proxy","\n","\n","// Switch back to no_proxy ","\n","proxy.setProxyOption(ProxyOption.NO_PROXY.name()) ","\n",'proxy.setProxyServerAddress("") ',"\n","proxy.setProxyServerPort(0) ","\n","Map<String, Object> generalProperties = RunConfiguration.getExecutionGeneralProperties(); generalProperties.put(RunConfiguration.PROXY_PROPERTY, new Gson().toJson(proxy)); ","\n","\n","println proxy","\n"]})})]})}function x(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},28453:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>a});var t=s(96540);const o={},r=t.createContext(o);function i(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.