*** Settings *** Force Tags tsg_adc_wp proxy_policy adc_verify Library OperatingSystem Resource ../../../02-Keyword/tsg_adc/SystemCommand.robot Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot Resource ../../../02-Keyword/tsg_bfapi/LogVariable.robot Resource ../../../02-Keyword/tsg_adc/FileOperation.robot Resource ../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot Resource ../../../03-Variable/ApplicationID.txt Resource ../../../05-Other/AllFlowCaseVariable.txt *** Test Cases *** Proxy-Policy-Monitor-00001 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_00001.bat ... ELSE set variable curl -kv \ tv.cctv.com ${stringlist} run keyword if '${systemType}'=='Windows' Create List CCTV节目官网 Tango Secure Gateway CA ... ELSE Create List CCTV节目官网 Tango Secure Gateway CA ${rescode} SystemCommands ${commandstr} ${stringlist} Comment 改变拦截策略 ${policyDict} Create Dictionary policyId=${intercept_monitor_policyId} source=${monitor_objectId46}|TSG_SECURITY_SOURCE_LOCATION policyName=SecurityPolicy-Intercept-monitor-01 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${monitor_objectId47}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} UpdatePolicies 1 ${policyDict} v2 update sleep 10 Comment 改变Monitor策略 ${policyDict} Create Dictionary policyId=${monitor_policyId} source=${monitor_objectId46}|TSG_SECURITY_SOURCE_LOCATION policyName=Proxy-Policy-monitor-00001 policyType=pxy_manipulation policyDesc=autotest action=monitor userRegion={"method":"monitor","protocol":"HTTP"} filterList=${monitor_objectId47}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} UpdatePolicies 1 ${policyDict} v2 update sleep 10 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_00001_1.bat ... ELSE set variable curl -kv \ curl -kv http://www.vancl.com/?source=vancl_net ${stringlist} run keyword if '${systemType}'=='Windows' Create List 凡客VANCL ... ELSE Create List 凡客VANCL ${rescode} SystemCommands ${commandstr} ${stringlist} Proxy-Policy-Monitor-00002 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_00002.bat ... ELSE set variable curl -kv \ \ https://www.parkpennies.com/index.htm ${stringlist} run keyword if '${systemType}'=='Windows' Create List Disneyland Pressed Coins Tango Secure Gateway CA ... ELSE Create List Disneyland Pressed Coins Tango Secure Gateway CA ${rescode} SystemCommands ${commandstr} ${stringlist} # Proxy-Policy-Monitor-00003 # Comment 功能端验证HTTP验证 # ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00003.bat # ... ELSE set variable curl -kv \ https://railways.kz/ # ${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA # ... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA # ${rescode} SystemCommands ${commandstr} ${stringlist} # Comment 功能端验证HTTP验证 # ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00003_1.bat # ... ELSE set variable curl -kv \ https://creativetravelgroup.com/ # ${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA # ... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA # ${rescode} SystemCommands ${commandstr} ${stringlist} # Comment 功能端验证HTTP验证 # ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00003_2.bat # ... ELSE set variable curl -kv \ https://www.hinabian.com/ # ${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA # ... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA # ${rescode} SystemCommands ${commandstr} ${stringlist} # Comment 功能端验证HTTP验证 # ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00003_3.bat # ... ELSE set variable curl -kv \ https://www.smithsonianjourneys.org/ # ${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA # ... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA # ${rescode} SystemCommands ${commandstr} ${stringlist} Proxy-Policy-Monitor-00004 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_00004_1.bat ... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'https://www.baidu.com/' https://v.qq.com/ ${stringlist} run keyword if '${systemType}'=='Windows' Create List 腾讯视频 Tango Secure Gateway CA ... ELSE Create List 腾讯视频 Tango Secure Gateway CA ${rescode} SystemCommands ${commandstr} ${stringlist} sleep 7 Comment 改变拦截策略 ${policyDict} Create Dictionary policyId=${intercept_monitor_policyId3} policyName=SecurityPolicy-Intercept-monitor-04 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${monitor_objectId48}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} UpdatePolicies 1 ${policyDict} v2 update sleep 3 Comment 改变Monitor策略 ${policyDict} Create Dictionary policyId=${monitor_policyId3} policyName=Proxy-Policy-monitor-00004-01 policyType=pxy_manipulation policyDesc=autotest action=monitor userRegion={"method":"monitor","protocol":"HTTP"} filterList=${monitor_objectId48}|TSG_FIELD_HTTP_HOST,${monitor_objectId49}|TSG_FIELD_HTTP_URL,${monitor_objectId50}|TSG_FIELD_HTTP_REQ_HDR isValid=${1} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} UpdatePolicies 1 ${policyDict} v2 update sleep 8 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_00004_2.bat ... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'https://www.baidu.com/' http://www.kumi.cn/ ${stringlist} run keyword if '${systemType}'=='Windows' Create List 最新动画片 ... ELSE Create List 最新动画片 ${rescode} SystemCommands ${commandstr} ${stringlist} Proxy-Policy-Monitor-00005 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_00005.bat ... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'https://www.baidu.com/' https://americantesol.com/tesol-register.html ${stringlist} run keyword if '${systemType}'=='Windows' Create List 高清视频在线观看 Tango Secure Gateway CA ... ELSE Create List 高清视频在线观看 Tango Secure Gateway CA ${rescode} SystemCommands ${commandstr} ${stringlist} Proxy-Policy-Monitor-00006 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_00006.bat ... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'https://www.baidu.com/' https://www.playgroundsessions.com/about/software-features ${stringlist} run keyword if '${systemType}'=='Windows' Create List 凤凰视频 Tango Secure Gateway CA ... ELSE Create List PP视频 Tango Secure Gateway CA ${rescode} SystemCommands ${commandstr} ${stringlist} Proxy-Policy-Monitor-00007 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_00007.bat ... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'https://www.baidu.com/' https://www.pptv.com/ ${stringlist} run keyword if '${systemType}'=='Windows' Create List PP视频 Tango Secure Gateway CA ... ELSE Create List PP视频 Tango Secure Gateway CA ${rescode} SystemCommands ${commandstr} ${stringlist} Proxy-Policy-Monitor-00008 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_00008.bat ... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'https://www.baidu.com/' http://www.zhenai.com/ ${stringlist} run keyword if '${systemType}'=='Windows' Create List 珍爱网-征婚 ... ELSE Create List 珍爱网-征婚 ${rescode} SystemCommands ${commandstr} ${stringlist} Comment 改变拦截策略 ${policyDict} Create Dictionary policyId=${intercept_monitor_policyId7} policyName=SecurityPolicy-Intercept-monitor-0801 policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} filterList=${monitor_objectId51}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID} log ${policyDict} ${rescode} UpdatePolicies 1 ${policyDict} v2 update sleep 5 Comment 改变阻断策略 ${policyDict} Create Dictionary policyId=${monitor_policyId7} policyName=Proxy-Policy-monitor-00008-1 policyType=pxy_manipulation policyDesc=autotest action=monitor userRegion={"method":"monitor","protocol":"HTTP"} filterList=${monitor_objectId52}|TSG_FIELD_HTTP_URL,${monitor_objectId53}|TSG_FIELD_HTTP_RES_HDR isValid=${1} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} UpdatePolicies 1 ${policyDict} v2 update sleep 5 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_00008_1.bat ... ELSE set variable curl -kv --user-agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36" --referer 'https://www.baidu.com/' https://love.163.com/ ${stringlist} run keyword if '${systemType}'=='Windows' Create List Tango 花田,网易 ... ELSE Create List Tango 花田,网易 ${rescode} SystemCommands ${commandstr} ${stringlist} Proxy-Policy-Monitor-00009 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_00009.bat ... ELSE set variable curl http://v.iqilu.com/ ${stringlist} run keyword if '${systemType}'=='Windows' Create List 山东网络台 ... ELSE Create List 山东网络台 ${rescode} SystemCommands ${commandstr} ${stringlist} Proxy-Policy-Monitor-00010 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_000010.bat ... ELSE set variable curl http://www.fun.tv/movie/ ${stringlist} run keyword if '${systemType}'=='Windows' Create List 风行电影频道 ... ELSE Create List 风行电影频道 ${rescode} SystemCommands ${commandstr} ${stringlist} Proxy-Policy-Monitor-00011 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Monitor_000011.bat ... ELSE set variable curl http://hongniang.com/ ${stringlist} run keyword if '${systemType}'=='Windows' Create List 中国红娘网 ... ELSE Create List 中国红娘网 ${rescode} SystemCommands ${commandstr} ${stringlist} # Proxy-Policy-Monitor-00012 # Comment 功能端验证HTTP验证 # ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00012.bat # ... ELSE set variable curl -kv --cookie "lQfQ_2132_saltkey=t8WY1oPe; lQfQ_2132_lastvisit=1595381790; lQfQ_2132_sid=vqXOg6; lQfQ_2132_lastact=1595385400%09forum.php%09image" --referer 'https://www.baidu.com/' \ https://www.youqulu.com/category/zixun # ${stringlist} run keyword if '${systemType}'=='Windows' Create List 123456789 Tango Secure Gateway CA # ... ELSE Create List 123456789 Tango Secure Gateway CA # ${rescode} SystemCommands ${commandstr} ${stringlist} # Proxy-Policy-Monitor-00013 # Comment 功能端验证HTTP验证 # ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00013.bat # ... ELSE set variable curl -kv \ https://www.nypl.org/books-music-movies # ${stringlist} run keyword if '${systemType}'=='Windows' Create List 一直相信 Tango Secure Gateway CA # ... ELSE Create List 一直相信 Tango Secure Gateway CA # ${rescode} SystemCommands ${commandstr} ${stringlist} # Comment 功能端验证HTTP验证 # ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00013_1.bat # ... ELSE set variable curl -kv https://www.thailand.com.co/category-207-b0.html # ${stringlist} run keyword if '${systemType}'=='Windows' Create List 一直相信 Tango Secure Gateway CA # ... ELSE Create List 一直相信 Tango Secure Gateway CA # ${rescode} SystemCommands ${commandstr} ${stringlist} # Comment 功能端验证HTTP验证 # ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00013_2.bat # ... ELSE set variable curl -kv \ https://bj.zu.ke.com/zufang # ${stringlist} run keyword if '${systemType}'=='Windows' Create List 一直相信 Tango Secure Gateway CA # ... ELSE Create List 一直相信 Tango Secure Gateway CA # ${rescode} SystemCommands ${commandstr} ${stringlist} # Comment 功能端验证HTTP验证 # ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00013_3.bat # ... ELSE set variable curl -kv \ https://nationalbank.kz/?switch=kazakh # ${stringlist} run keyword if '${systemType}'=='Windows' Create List 一直相信 Tango Secure Gateway CA # ... ELSE Create List 一直相信 Tango Secure Gateway CA # ${rescode} SystemCommands ${commandstr} ${stringlist} Proxy-Policy-Monitor-00014 Comment 使用时再开启拦截策略 ${policyDict} Create Dictionary policyId=${intercept_monitor_policyId13} policyName=SecurityPolicy-Intercept-monitor policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${monitor_objectId34}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} UpdatePolicies 1 ${policyDict} v2 update sleep 6 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00014_1.bat ... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=1234567&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset ... ELSE Create List Connection was reset ${rescode} SystemCommands ${commandstr} ${stringlist} Proxy-Policy-Monitor-00015 Comment 功能端验证HTTP验证 ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00015.bat ... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"lkjh","setcook":"qeqew","contenttype": "content-type","responsebody": "ASDFG"}" http://open.node.com/go ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset ... ELSE Create List Connection was reset ${rescode} SystemCommands ${commandstr} ${stringlist} Comment 用后关闭,要不然会与其他策略互相影响 ${policyDict} Create Dictionary policyId=${intercept_monitor_policyId13} policyName=SecurityPolicy-Intercept-monitor policyType=tsg_security policyDesc=autotest action=intercept userRegion={"protocol":"HTTP"} filterList=${monitor_objectId34}|TSG_FIELD_HTTP_HOST isValid=${1} appIdObjects=${HTTP_ID} log ${policyDict} ${rescode} UpdatePolicies 1 ${policyDict} v2 update # Proxy-Policy-Monitor-00016 # Comment 功能端验证HTTP验证 # ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00018.bat # ... ELSE set variable curl -kv https://www.stewart.com/en.html # Comment 功能端验证HTTP验证 # ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00018.bat # ... ELSE set variable curl -kv https://www.stewart.com/en.html # ${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA # ... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用 Tango Secure Gateway CA # ${rescode} SystemCommands ${commandstr} ${stringlist} # Proxy-Policy-Monitor-00017 # Comment 功能端验证HTTP验证 # ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00016.bat # ... ELSE set variable curl -H "Content-Type:application/json;charset=UTF-8" -X POST -d "{"requestbody":"mnbv","setcook":"asdf","contenttype": "content-type","responsebody": "adzx"}" -kv --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36" --referer 'http://www.baidu.com/' http://open.node.com/go # ${stringlist} run keyword if '${systemType}'=='Windows' Create List Not Found # ... ELSE Create List Not Found # ${rescode} SystemCommands ${commandstr} ${stringlist} # Proxy-Policy-Monitor-00018 # Comment 功能端验证HTTP验证 # ${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/ProxyPolicy_Deny_00017.bat # ... ELSE set variable curl -kv --cookie "test%20cookie=null; timezoneoffset=-480; ASP.NET_SessionId=sta2b3gxpxzqei3by1ka3qsa; visid_incap_1010467=Iu/pLzeoTnGn2VDjWdP9GpoBGF8AAAAAQUIPAAAAAADzSLZtZ1tZ/Rbjfct3Nq69" --referer 'https://www.baidu.com/' \ https://www.umusicpub.com/au/ # ${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset Tango Secure Gateway CA # ... ELSE Create List Connection reset by peer Tango Secure Gateway CA # ${rescode} SystemCommands ${commandstr} ${stringlist}