--[[ <HCExtension>@name WhiteUser@author mai62@version 0.11@description Отключение Черного списка или переадресации для заданных пользователей@event RequestHeaderReceived/RequestReceived</HCExtension> ]]function RequestReceived() local mask='' if hc.user_name=='user1' or hc.user_name=='user2' then mask='B' hc.user_speed_limit=20*1024 end if hc.user_name=='user31' or hc.user_name=='user32' then mask=mask..'R' end if #mask>0 then hc.monitor_string = hc.monitor_string.."WU " hc.white_mask=mask endend
--[[ <HCExtension>@name Ограничить скорость доступа к определенным ресурсам (Videohostings)@rule videoplay|lscache|youtube|playback@rule \.(flv|mp4)(\?|$)@event RequestHeaderReceived/Request</HCExtension> ]]function Request() hc.file_speed_limit = 256000 -- 250 кбайт в секундуend
hc.execute_cmd('LoadURL http://ping.proxy/')
hc_static['count']<=1
--[[ <HCExtension>@name POST notification@event BeforeRequestBodySend/BeforeRequestBodySend</HCExtension> ]]function BeforeRequestBodySend() hc.put_msg(10, 'POST')end
--[[ <HCExtension>@name Test extension@event Init/init</HCExtension> ]]function init() local WC_COMPOSITECHECK = 512 local WC_DEFAULTCHAR = 64 local WC_DISCARDNS = 16 local WC_SEPCHARS = 32 local s1,b1 = hc.recode('абвгд 12345 abcde', 1251, 28591, WC_COMPOSITECHECK, '#') hc.put_msg(s1) local s2,b2 = hc.recode('абвгд 12345 abcde', 1251, 28591, WC_COMPOSITECHECK+WC_DEFAULTCHAR, '#') hc.put_msg(s2) local s3,b3 = hc.recode('абвгд 12345 abcde', 1251, 28591, WC_COMPOSITECHECK+WC_DISCARDNS, '#') hc.put_msg(s3) local s4,b4 = hc.recode('абвгд 12345 abcde', 1251, 28591, WC_COMPOSITECHECK+WC_SEPCHARS, '#') hc.put_msg(s4) local s5,b5 = hc.recode('абвгд 12345 abcde', 1251, 28591, WC_COMPOSITECHECK) hc.put_msg(s5) local s6,b6 = hc.recode('абвгд 12345 abcde', 1251, 28591, WC_COMPOSITECHECK+WC_DEFAULTCHAR) hc.put_msg(s6) local s7,b7 = hc.recode('абвгд 12345 abcde', 1251, 28591, WC_COMPOSITECHECK+WC_DISCARDNS) hc.put_msg(s7) local s8,b8 = hc.recode('абвгд 12345 abcde', 1251, 28591, WC_COMPOSITECHECK+WC_SEPCHARS) hc.put_msg(s8)end
Put Info Window:##### 12345 abcdePut Info Window:##### 12345 abcdePut Info Window:##### 12345 abcdePut Info Window:##### 12345 abcdePut Info Window:????? 12345 abcdePut Info Window:????? 12345 abcdePut Info Window:????? 12345 abcdePut Info Window:????? 12345 abcde
local s7,b7 = hc.recode('абвгд 12345 abcde', 1251, 28591, WC_COMPOSITECHECK+WC_DISCARDNS)
s7 = ????? 12345 abcdeb7 = true
--[[ <HCExtension>name POST_breakevent BeforeRequestBodySend/stop_action</HCExtension> ]]function stop_action() if hc.method == "POST" then hc.action = "stop" endend