

function CheckFireWall(tab)	
	
	if tab == nil then
		return nil
	end
	--XLMessageBox("CheckFireWall")
	local Obj = XLGetObject("Xunlei.OSShell.Obj")
	--XLMessageBox(tab['rule@']['file'])
	local result = 0
	for i = 0, #tab["rule"] do
		if tab["rule"][i]~=nil then
			if Obj:CheckFireWall(tab["rule"][i]['file@']['path']) then 
			else
				result = 1
				break
			end
		end
	end
	--XLMessageBox(tostring(result))
	return result	
end
function FixFireWall(tab)
	
	if tab == nil then
		return nil
	end
	local Obj = XLGetObject("Xunlei.OSShell.Obj")
	--XLMessageBox("FixFireWall")
	local result = 0
	for i = 0, #tab["rule"] do
		if tab["rule"][i]~=nil then
			if Obj:FixFireWall(tab["rule"][i]['file@']['path'], tab["rule"][i]['file@']['path']) then 
			else
				result = 1
			end
		end
	end
end