???¨¤ JFIF    ?? C    !"$"$?? C  ?? p " ??     ??   ?¨²   ???? (% aA*?XYD?(J??E¡éRE,P€XYae?)(E¡è2€B¡èR£¤ BQ¡è¡é X?)X¡­€¡è? @ .............................................................................................................................................................................. ............................................................................. PK;½N]õ)T4 4 lualib/type_checkers.luanu„[µü¤-- -------------------------------------------------------------------------------- -- FILE: type_checkers.lua -- DESCRIPTION: protoc-gen-lua -- Google's Protocol Buffers project, ported to lua. -- https://code.google.com/p/protoc-gen-lua/ -- -- Copyright (c) 2010 , æž—å�“毅 (Zhuoyi Lin) netsnail@gmail.com -- All rights reserved. -- -- Use, modification and distribution are subject to the "New BSD License" -- as listed at . -- -- COMPANY: NetEase -- CREATED: 2010å¹´07月29æ—¥ 19æ—¶30分37ç§’ CST -------------------------------------------------------------------------------- -- local type = type local error = error local string = string module "type_checkers" function TypeChecker(acceptable_types) local acceptable_types = acceptable_types return function(proposed_value) local t = type(proposed_value) if acceptable_types[type(proposed_value)] == nil then error(string.format('%s has type %s, but expected one of: %s', proposed_value, type(proposed_value), acceptable_types)) end end end function Int32ValueChecker() local _MIN = -2147483648 local _MAX = 2147483647 return function(proposed_value) if type(proposed_value) ~= 'number' then error(string.format('%s has type %s, but expected one of: number', proposed_value, type(proposed_value))) end if _MIN > proposed_value or proposed_value > _MAX then error('Value out of range: ' .. proposed_value) end end end function Uint32ValueChecker(IntValueChecker) local _MIN = 0 local _MAX = 0xffffffff return function(proposed_value) if type(proposed_value) ~= 'number' then error(string.format('%s has type %s, but expected one of: number', proposed_value, type(proposed_value))) end if _MIN > proposed_value or proposed_value > _MAX then error('Value out of range: ' .. proposed_value) end end end function UnicodeValueChecker() return function (proposed_value) if type(proposed_value) ~= 'string' then error(string.format('%s has type %s, but expected one of: string', proposed_value, type(proposed_value))) end end end PK;½N]Ò{¬6w:w:lualib/encoder.luanu„[µü¤-- -------------------------------------------------------------------------------- -- FILE: encoder.lua -- DESCRIPTION: protoc-gen-lua -- Google's Protocol Buffers project, ported to lua. -- https://code.google.com/p/protoc-gen-lua/ -- -- Copyright (c) 2010 , æž—å�“毅 (Zhuoyi Lin) netsnail@gmail.com -- All rights reserved. -- -- Use, modification and distribution are subject to the "New BSD License" -- as listed at . -- -- COMPANY: NetEase -- CREATED: 2010å¹´07月29æ—¥ 19æ—¶30分46ç§’ CST -------------------------------------------------------------------------------- -- local string = string local table = table local ipairs = ipairs local assert =assert local pb = require "pb" local wire_format = require "wire_format" module "encoder" function _VarintSize(value) if value <= 0x7f then return 1 end if value <= 0x3fff then return 2 end if value <= 0x1fffff then return 3 end if value <= 0xfffffff then return 4 end return 5 end function _SignedVarintSize(value) if value < 0 then return 10 end if value <= 0x7f then return 1 end if value <= 0x3fff then return 2 end if value <= 0x1fffff then return 3 end if value <= 0xfffffff then return 4 end return 5 end function _TagSize(field_number) return _VarintSize(wire_format.PackTag(field_number, 0)) end function _SimpleSizer(compute_value_size) return function(field_number, is_repeated, is_packed) local tag_size = _TagSize(field_number) if is_packed then local VarintSize = _VarintSize return function(value) local result = 0 for _, element in ipairs(value) do result = result + compute_value_size(element) end return result + VarintSize(result) + tag_size end elseif is_repeated then return function(value) local result = tag_size * #value for _, element in ipairs(value) do result = result + compute_value_size(element) end return result end else return function (value) return tag_size + compute_value_size(value) end end end end function _ModifiedSizer(compute_value_size, modify_value) return function (field_number, is_repeated, is_packed) local tag_size = _TagSize(field_number) if is_packed then local VarintSize = _VarintSize return function (value) local result = 0 for _, element in ipairs(value) do result = result + compute_value_size(modify_value(element)) end return result + VarintSize(result) + tag_size end elseif is_repeated then return function (value) local result = tag_size * #value for _, element in ipairs(value) do result = result + compute_value_size(modify_value(element)) end return result end else return function (value) return tag_size + compute_value_size(modify_value(value)) end end end end function _FixedSizer(value_size) return function (field_number, is_repeated, is_packed) local tag_size = _TagSize(field_number) if is_packed then local VarintSize = _VarintSize return function (value) local result = #value * value_size return result + VarintSize(result) + tag_size end elseif is_repeated then local element_size = value_size + tag_size return function(value) return #value * element_size end else local field_size = value_size + tag_size return function (value) return field_size end end end end Int32Sizer = _SimpleSizer(_SignedVarintSize) Int64Sizer = Int32Sizer EnumSizer = Int32Sizer UInt32Sizer = _SimpleSizer(_VarintSize) UInt64Sizer = UInt32Sizer SInt32Sizer = _ModifiedSizer(_SignedVarintSize, wire_format.ZigZagEncode) SInt64Sizer = SInt32Sizer Fixed32Sizer = _FixedSizer(4) SFixed32Sizer = Fixed32Sizer FloatSizer = Fixed32Sizer Fixed64Sizer = _FixedSizer(8) SFixed64Sizer = Fixed64Sizer DoubleSizer = Fixed64Sizer BoolSizer = _FixedSizer(1) function StringSizer(field_number, is_repeated, is_packed) local tag_size = _TagSize(field_number) local VarintSize = _VarintSize assert(not is_packed) if is_repeated then return function(value) local result = tag_size * #value for _, element in ipairs(value) do local l = #element result = result + VarintSize(l) + l end return result end else return function(value) local l = #value return tag_size + VarintSize(l) + l end end end function BytesSizer(field_number, is_repeated, is_packed) local tag_size = _TagSize(field_number) local VarintSize = _VarintSize assert(not is_packed) if is_repeated then return function (value) local result = tag_size * #value for _,element in ipairs(value) do local l = #element result = result + VarintSize(l) + l end return result end else return function (value) local l = #value return tag_size + VarintSize(l) + l end end end function MessageSizer(field_number, is_repeated, is_packed) local tag_size = _TagSize(field_number) local VarintSize = _VarintSize assert(not is_packed) if is_repeated then return function(value) local result = tag_size * #value for _,element in ipairs(value) do local l = element:ByteSize() result = result + VarintSize(l) + l end return result end else return function (value) local l = value:ByteSize() return tag_size + VarintSize(l) + l end end end -- ==================================================================== -- Encoders! local _EncodeVarint = pb.varint_encoder local _EncodeSignedVarint = pb.signed_varint_encoder function _VarintBytes(value) local out = {} local write = function(value) out[#out + 1 ] = value end _EncodeSignedVarint(write, value) return table.concat(out) end function TagBytes(field_number, wire_type) return _VarintBytes(wire_format.PackTag(field_number, wire_type)) end function _SimpleEncoder(wire_type, encode_value, compute_value_size) return function(field_number, is_repeated, is_packed) if is_packed then local tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) local EncodeVarint = _EncodeVarint return function(write, value) write(tag_bytes) local size = 0 for _, element in ipairs(value) do size = size + compute_value_size(element) end EncodeVarint(write, size) for element in value do encode_value(write, element) end end elseif is_repeated then local tag_bytes = TagBytes(field_number, wire_type) return function(write, value) for _, element in ipairs(value) do write(tag_bytes) encode_value(write, element) end end else local tag_bytes = TagBytes(field_number, wire_type) return function(write, value) write(tag_bytes) encode_value(write, value) end end end end function _ModifiedEncoder(wire_type, encode_value, compute_value_size, modify_value) return function (field_number, is_repeated, is_packed) if is_packed then local tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) local EncodeVarint = _EncodeVarint return function (write, value) write(tag_bytes) local size = 0 for _, element in ipairs(value) do size = size + compute_value_size(modify_value(element)) end EncodeVarint(write, size) for _, element in ipairs(value) do encode_value(write, modify_value(element)) end end elseif is_repeated then local tag_bytes = TagBytes(field_number, wire_type) return function (write, value) for _, element in ipairs(value) do write(tag_bytes) encode_value(write, modify_value(element)) end end else local tag_bytes = TagBytes(field_number, wire_type) return function (write, value) write(tag_bytes) encode_value(write, modify_value(value)) end end end end function _StructPackEncoder(wire_type, value_size, format) return function(field_number, is_repeated, is_packed) local struct_pack = pb.struct_pack if is_packed then local tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) local EncodeVarint = _EncodeVarint return function (write, value) write(tag_bytes) EncodeVarint(write, #value * value_size) for _, element in ipairs(value) do struct_pack(write, format, element) end end elseif is_repeated then local tag_bytes = TagBytes(field_number, wire_type) return function (write, value) for _, element in ipairs(value) do write(tag_bytes) struct_pack(write, format, element) end end else local tag_bytes = TagBytes(field_number, wire_type) return function (write, value) write(tag_bytes) struct_pack(write, format, value) end end end end Int32Encoder = _SimpleEncoder(wire_format.WIRETYPE_VARINT, _EncodeSignedVarint, _SignedVarintSize) Int64Encoder = Int32Encoder EnumEncoder = Int32Encoder UInt32Encoder = _SimpleEncoder(wire_format.WIRETYPE_VARINT, _EncodeVarint, _VarintSize) UInt64Encoder = UInt32Encoder SInt32Encoder = _ModifiedEncoder( wire_format.WIRETYPE_VARINT, _EncodeVarint, _VarintSize, wire_format.ZigZagEncode32) SInt64Encoder = _ModifiedEncoder( wire_format.WIRETYPE_VARINT, _EncodeVarint, _VarintSize, wire_format.ZigZagEncode64) Fixed32Encoder = _StructPackEncoder(wire_format.WIRETYPE_FIXED32, 4, string.byte('I')) Fixed64Encoder = _StructPackEncoder(wire_format.WIRETYPE_FIXED64, 8, string.byte('Q')) SFixed32Encoder = _StructPackEncoder(wire_format.WIRETYPE_FIXED32, 4, string.byte('i')) SFixed64Encoder = _StructPackEncoder(wire_format.WIRETYPE_FIXED64, 8, string.byte('q')) FloatEncoder = _StructPackEncoder(wire_format.WIRETYPE_FIXED32, 4, string.byte('f')) DoubleEncoder = _StructPackEncoder(wire_format.WIRETYPE_FIXED64, 8, string.byte('d')) function BoolEncoder(field_number, is_repeated, is_packed) local false_byte = '\0' local true_byte = '\1' if is_packed then local tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) local EncodeVarint = _EncodeVarint return function (write, value) write(tag_bytes) EncodeVarint(write, #value) for _, element in ipairs(value) do if element then write(true_byte) else write(false_byte) end end end elseif is_repeated then local tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_VARINT) return function(write, value) for _, element in ipairs(value) do write(tag_bytes) if element then write(true_byte) else write(false_byte) end end end else local tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_VARINT) return function (write, value) write(tag_bytes) if value then return write(true_byte) end return write(false_byte) end end end function StringEncoder(field_number, is_repeated, is_packed) local tag = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) local EncodeVarint = _EncodeVarint assert(not is_packed) if is_repeated then return function (write, value) for _, element in ipairs(value) do -- encoded = element.encode('utf-8') write(tag) EncodeVarint(write, #element) write(element) end end else return function (write, value) -- local encoded = value.encode('utf-8') write(tag) EncodeVarint(write, #value) return write(value) end end end function BytesEncoder(field_number, is_repeated, is_packed) local tag = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) local EncodeVarint = _EncodeVarint assert(not is_packed) if is_repeated then return function (write, value) for _, element in ipairs(value) do write(tag) EncodeVarint(write, #element) write(element) end end else return function(write, value) write(tag) EncodeVarint(write, #value) return write(value) end end end function MessageEncoder(field_number, is_repeated, is_packed) local tag = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) local EncodeVarint = _EncodeVarint assert(not is_packed) if is_repeated then return function(write, value) for _, element in ipairs(value) do write(tag) EncodeVarint(write, element:ByteSize()) element:_InternalSerialize(write) end end else return function (write, value) write(tag) EncodeVarint(write, value:ByteSize()) return value:_InternalSerialize(write) end end end PK;½N]WÈÉ0À<À< lualib/pb.sonuȯÝíELF>à@6@8@## �,�, �, 8@ ð-ð- ð- ààÈÈÈ$$Påtd˜˜˜¬¬QåtdRåtd�,�, �, ppGNU q0þµ‚]5ñ݉£-µ»éœµˆD`BEÕì»ã’|ÙqX‹%â ƒ$ƒýv”¶hU¤r DÈ4í×, VF"e®È0 ÁÐ0 µÈ0 K À___gmon_start___ITM_deregisterTMCloneTable_ITM_registerTMCloneTable__cxa_finalizelua_newuserdatalua_getfieldlua_setmetatableluaL_checknumberlua_pushintegerluaL_checkintegerluaL_checklstringlua_pushnumberluaL_errorlua_settoplua_pushlstringlua_callluaL_prepbufferluaL_buffinitluaL_pushresultluaL_checkudatamemcpyluaopen_pbluaL_newmetatablelua_pushvaluelua_setfieldluaL_registerlibluajit-5.1.so.2libc.so.6_edata__bss_start_endGLIBC_2.2.5GLIBC_2.14/opt/imunify360-webshield/luajit/lib¤ui Æ”‘–Ò�, �˜, P ,  , À, €È, Ð, ‹Ø, Ðà, ‘è, 0ð, —ø, @- ›-  - ¨(- €0- ¡8- @- ·H- ðP- ÀX- p`- Ìh- ðp- áx- À€- Úˆ- À�- ð˜- � - ¨- `°- ¸- À- #È- àÐ- 4Ø-  Ð/ Ø/ à/ è/ 0  0 (0 00 80 @0 H0 P0  X0  `0  h0  p0  x0 €0 ˆ0 �0 ˜0  0 ¨0 °0 ¸0 À0 óúHƒìH‹y" H…ÀtÿÐHƒÄÃÿ5’" ÿ%”" @ÿ%’" héàÿÿÿÿ%Š" héÐÿÿÿÿ%‚" héÀÿÿÿÿ%z" hé°ÿÿÿÿ%r" hé ÿÿÿÿ%j" hé�ÿÿÿÿ%b" hé€ÿÿÿÿ%Z" hépÿÿÿÿ%R" hé`ÿÿÿÿ%J" h éPÿÿÿÿ%B" h é@ÿÿÿÿ%:" h é0ÿÿÿÿ%2" h é ÿÿÿÿ%*" h éÿÿÿÿ%"" héÿÿÿÿ%" héðþÿÿÿ%" héàþÿÿÿ% " héÐþÿÿÿ%" héÀþÿÿÿ%ú! hé°þÿÿÿ%ò! hé þÿÿÿ%ê! hé�þÿÿH�=á! H�Ú! H9øtH‹Ö H…Àt ÿà€Ã€H�=±! H�5ª! H)þHÁþH‰ðHÁè?HÆHÑþtH‹¥ H…ÀtÿàfDÀóú€=m! u+UHƒ=‚ H‰åt H�=. èIÿÿÿèdÿÿÿÆE! ]ÃÀóúéwÿÿÿ€S¾H‰ûèrþÿÿH‰ß¾ðØÿÿH�s HÇèÿÿÿH‰ß¾þÿÿÿèjþÿÿ¸[ÃS¾H‰ûè¢ýÿÿH‰ßòH,ÀH�4HÁø?H1ÆèÚýÿÿ¸[ÃS¾H‰ûèrýÿÿò jf/Ás$òH,ÀH‰ÆHÑèH‰ßƒæH÷ÞH1Æè˜ýÿÿ¸[Ã�ò\ÁòH,ÀHºø?ëÑS¾H‰ûèÂýÿÿH‰ß�4Áø1Æèbýÿÿ¸[Ãff.„S¾H‰ûè’ýÿÿH‰ß‰ÆÑèƒæ÷Þ1ÆHcöè,ýÿÿ¸[ÃDAT¾USH‰ûHƒìH�T$èýÿÿ¾H‰ßH‰ÅèFýÿÿ1ÉI‰ÄH�TH‹D$ëDH9È‚‡¶< HƒÁ@„ÿxêH‰L$HƒùÿtxD¶AƒàHƒùt2H�ÍHƒÂH)ȹD¶:HƒÂƒçHÓçHƒÁI øH9ÁuçfïÀH‰ßòI*ÀèîüÿÿH‹t$H‰ßLæè^üÿÿHƒÄ¸[]A\ÃHÇD$ÿÿÿÿH‰ßHÇÁÿÿÿÿH�5˜ 1ÀèßüÿÿHƒÄ¸[]A\Ã�AT¾USH‰ûHƒìH�T$èüÿÿ¾H‰ßH‰ÅèFüÿÿH‹t$1ÉI‰ÄH�TëDH9΂·¶ HƒÁ„ÀxëH‰L$Hƒùÿ„¥D¶AƒàHƒùt7H�ÍHƒÂH)ȹf.„¶:HƒÂƒçHÓçHƒÁI øH9ÁuçM…Àx2fïÀòI*ÀH‰ßèáûÿÿH‹t$H‰ßLæèQûÿÿHƒÄ¸[]A\ÃL‰ÀAƒàfïÀHÑèL ÀòH*ÀòXÀë»@HÇD$ÿÿÿÿH‰ßHÇÁÿÿÿÿH�5h 1Àè¯ûÿÿHƒÄ¸[]A\Ã�AT¾UH‰ýSHƒìè+ûÿÿH�T$¾H‰ïH‰ÃèÖúÿÿ¾H‰ïI‰Äèûÿÿ�S·IÄ€ú(‡÷H�  ¶ÒHc‘HÈÿà@fïÀH‰ïòI*$èþúÿÿHƒÄ¸[]A\ÃA‹$fïÀH‰ïòH*ÀèÛúÿÿHƒÄ¸[]A\ÃDI‹$H…Àˆ«fïÀòH*ÀH‰ïèªúÿÿHƒÄ¸[]A\Ã@òA$H‰ïèŠúÿÿHƒÄ¸[]A\Ã@H‰ïfïÀóAZ$èfúÿÿHƒÄ¸[]A\ÄIc4$H‰ïèÄùÿÿHƒÄ¸[]A\ÃfDH‰ïH�51ÀèOúÿÿHƒÄ¸[]A\Ã�H‰ÂƒàfïÀHÑêH ÂòH*ÂòXÀé@ÿÿÿf�U¾H‰ýSHƒì(è­ùÿÿ¾H‰ïH‰Ãèýøÿÿ¾H‰ïòD$èÚøÿÿ�C·<(‡H�0 ¶ÀòD$Hc‚HÐÿàfDòH,ÀH�t$ºH‰ïH‰D$è”ùÿÿH‰ï1Ò¾èÅøÿÿHƒÄ(1À[]Ã@òH,ÀH�t$ºH‰ï‰D$è]ùÿÿëÇò ` f/Áƒ–òH,ÀH‰D$H�t$ºH‰ïè*ùÿÿ딄H�t$ºH‰ïòD$èùÿÿéoÿÿÿfïÒH�t$ºH‰ïòZÐóT$èàøÿÿéGÿÿÿò,Àé\ÿÿÿ€H�5™H‰ï1ÀèÇøÿÿéÿÿÿf�ò\ÁòH,ÀH‰D$Hº|$?éZÿÿÿfDAT¾UH‰ýSHƒìH�T$èæ÷ÿÿ¾H‰ïH‰ÃèøÿÿH‹|$1ÒI‰ÄH�4ë fDH9×rC¶ HƒÂ„ÉxïH‰T$Hƒúÿt5H‰ïè,øÿÿH‹t$H‰ïLæè|÷ÿÿHƒÄ¸[]A\ÃfDHÇD$ÿÿÿÿH‰òH‰ïHÇÁÿÿÿÿ1ÀH�5«èô÷ÿÿHƒÄ¸[]A\ÃfDAUATL�§ UH‰õSH‰ûHƒìH‹Hƒþ†lI9Ć›H�PI‰íH‰‰êIÁíƒÊ€ˆH‹Iƒý†aL9àƒ€H�PAƒÍ€H‰Dˆ(I‰íH‹IÁíIƒý†6L9àƒ}H�PAƒÍ€H‰Dˆ(I‰íH‹IÁíIƒý† L9àƒBH�PAƒÍ€H‰Dˆ(I‰íH‹IÁíIƒý†àL9àƒ7H�PAƒÍ€H‰Dˆ(I‰íH‹IÁí#Iƒý†µL9àƒH�PAƒÍ€H‰Dˆ(I‰íH‹IÁí*Iƒý†ŠL9àƒH�PAƒÍ€H‰Dˆ(I‰íH‹IÁí1IƒývcL9àƒêH�PAƒÍ€HÁí8H‰Dˆ(I‰íH‹HƒývL9àƒÓH�P½H‰Dˆ(H‹�L9às#H�PH‰@ˆ(HƒÄ[]A\A]ÃfDD‰íL9àrÝH‰ßè�õÿÿH‹ëÐèƒõÿÿH‹éXþÿÿH‰ßèpõÿÿH‹épþÿÿ„H‰ßèXõÿÿH‹é®þÿÿH‰ßèHõÿÿH‹ésþÿÿH‰ßè8õÿÿH‹é¹þÿÿH‰ßè(õÿÿH‹éÔþÿÿH‰ßèõÿÿH‹éïþÿÿH‰ßèõÿÿH‹éÿÿÿH‰ßèøôÿÿH‹éÿÿÿU¾SH‰ûH�ì8 èjôÿÿH�l$H‰ßH‰îòD$ètõÿÿòD$H‰ïòH,ðèaýÿÿ¾H‰ßè$ôÿÿH‰ïè<ôÿÿH‰ß1Ò¾èMôÿÿH�Ä8 1À[]Ã�U¾SH‰ûH�ì8 èúóÿÿH�l$H‰ßH‰îòD$èõÿÿò ÜòD$f/Ás@òH,ðH‰ïèãüÿÿ¾H‰ßè¦óÿÿH‰ïè¾óÿÿH‰ß1Ò¾èÏóÿÿH�Ä8 1À[]Ãò\ÁòH,ðHºþ?ëµHƒìH�¾èKôÿÿHÇ1ÀHƒÄÃff.„f�AUH�ç¾ATUH‰ýSHƒìèôÿÿ¾H‰ïI‰ÅèÂóÿÿ¾H‰ïI‰Äè²óÿÿH‰ÃI9ÄwI9EsH�5ÕH‰ï1ÀèóóÿÿH�SK�t%H‰ïL)âèÏóÿÿHƒÄ¸[]A\A]Ãff.„@SH�X¾H‰ûè‹óÿÿH‰ßH‹0èðòÿÿ¸[Ãf„SH�(¾H‰ûè[óÿÿH‰ßH‹H�pè\óÿÿ¸[ÃDATH�÷¾UH‰ýSHƒìè$óÿÿH�T$¾H‰ïH‰Ãè�òÿÿH‹T$I‰ÄH‹H� H�ùÿÿw'H�|L‰æèÊòÿÿH‹D$H1ÀHƒÄ[]A\ÀH�5ÁH‰ï1ÀèßòÿÿH‹T$H‹ë¾DSH�5hH‰ûèÐòÿÿH‰ß¾ÿÿÿÿè3òÿÿH‰ß¾þÿÿÿH�‰èßñÿÿH‰ßH�Å 1öè®ñÿÿH‰ßH� H�5jè˜ñÿÿ¸[ÃóúHƒìHƒÄÃprotobuf.IOStringerror data %s, len:%dUnknown, formatOut of range__indexpb__tostring__lenwritesubclearsigned_varint_encoderread_tagstruct_packstruct_unpacksigned_varint_decoderzig_zag_decode32zig_zag_encode32zig_zag_decode64zig_zag_encode64new_iostring,öÿÿìöÿÿìöÿÿìöÿÿìöÿÿìöÿÿìöÿÿìöÿÿTöÿÿìöÿÿìöÿÿìöÿÿìöÿÿìöÿÿìöÿÿìöÿÿìöÿÿìöÿÿìöÿÿìöÿÿìöÿÿìöÿÿìöÿÿìöÿÿìöÿÿìöÿÿìöÿÿ„öÿÿìöÿÿ¤öÿÿìöÿÿìöÿÿÌöÿÿìöÿÿìöÿÿìöÿÿìöÿÿìöÿÿìöÿÿìöÿÿ öÿÿ ÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿ@÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿx÷ÿÿÐ÷ÿÿ˜÷ÿÿÐ÷ÿÿÐ÷ÿÿÀ÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿÐ÷ÿÿèöÿÿàC;¬ØîÿÿÈñÿÿðHñÿÿ xñÿÿ(ÈñÿÿDøñÿÿ`(òÿÿ|(óÿÿ¼XôÿÿüØõÿÿŒX÷ÿÿ¸øÿÿøxúÿÿ4èúÿÿ`xûÿÿŒ¨ûÿÿ¤8üÿÿÜhüÿÿø˜üÿÿ(ýÿÿHzRx �$îÿÿpFJ w€?;*3$"Dðÿÿ=Aƒ{`4ðÿÿ-Aƒk|HðÿÿPAƒ} B ˜|ðÿÿ%Aƒc´�ðÿÿ+Aƒi<ФðÿÿÿBŒF†A ƒG0¶  FABA e FAB<dñÿÿ/BŒF†A ƒG0à  FABD E FABŒPTòÿÿ~BŒF†D ƒD0f  FABA Y  FABF b  FABE R  FABE V  FABI P  FABG U  FABB (àDóÿÿzA†IƒD@� CAE < ˜ôÿÿºBŒF†D ƒD0h  FABG h FAB8Lõÿÿ`B�BŒH †D(ƒG0Œ (A ABBG (ˆ<÷ÿÿoA†FƒJÐ@YCA(´€÷ÿÿ�A†FƒJÐ@g CAD àä÷ÿÿ#D^4øü÷ÿÿ�B�NŒA †D(ƒD0\(F ABB0Tøÿÿ'AƒeLhøÿÿ+Aƒi0h|øÿÿ‹BŒM†D ƒD0M  AABH œØøÿÿ_Aƒ]�P , €‹Ð‘0—@›¨€¡·ðÀpÌðáÀÚÀð�`#à4 ‘¤Ý P �, ˜, õþÿoðø(  0 @ hØ þÿÿo8ÿÿÿoðÿÿoúùÿÿo%ð- † – ¦ ¶ Æ Ö æ ö &6FVfv†–¦¶ÆÖGA$3a1P -pb.so-1.49.0-1.el8.x86_64.debugžï½Øý7zXZæÖ´F!t/å£à�]?‘E„h=‰¦ÚŠáƒ2NÙ½Ç7Û¼".çc4¦'ŠŽGëLôù¢$�«Jõ4CÙÙõ鈆žöÖA0¶{œi^ÓUþF›âúõ:î”w¸|Ó©\å+ƒ™8tk $àÊü»õ!;ÈcÉŒ?w™ƒÎ#Óþ‹R„ØÛVG KQôl%‰(]H¡~ü7àæ•ÒÞf/Pz¡�]ú*ZÀT G=ß÷^n0ò|‚V‹xÑXñ~}ˆAnáSd­ô3D³ÊZÑýäí�ñ"Z§Û" œÙŽmJ ;J.�-8ÃX¸Ò'bPóÝ-c÷ïWZoM÷#Z“Jjxð B¿ç“ýL6«¸Ý¬.¥�,~1ïX~�DpˆÂFÛSðBxsO;RQ�0«*a`±ÕóßEÁ¾Ê˜N‘‹�@„™qr´w Og2iÞL±xÆ2´:Vª�ˆÒ"~šE׈€¹EÌÌ�Ä¿Šo ~[±`!D¨š>n×O÷Ån'j\Ž“óŸ3êu^„IjÝÿ£TÍ–§ŸóµûšX¢W›W· ²õâç"ÑøJ8Ã6FÈçü”ªå]b½|› µCAžô�G?s˜ ¯š\ªøû… ,÷™›Œ·]“öaJ‰x®„5 {МþPPyTy�F£NôÔÏÉ�–’­ÁáÙŒpÛ Ãâ´êо–Žæ†nøZõä¼÷‡rÉüõÌ®zñ¿‚ÁùÅ0[Sþ™TE ¬í4Q¿’#õB/™¤hûh7ÁÄÎæo F÷ *àŒ 7î¤xYÞyÅÓ|¶„Õ'¥°ßËtˆ-úM‡Å2403þ$—Hn_LRé9Éé &X‰þ7ï œ]•ûÇg…¢ú& upÀ0†m¼±Èd/µMrU¢|³ÞVüIj‡oòï—# ‡fJ‹t/±Œ|=Ó̬©iñ!-li%Äɤ sZ09}ób‡òJ S>Ü2,Þ’JcQ~Ðë/aH>Œ› ˆêª ŸÂI�ã•o§pôZ¤‘­Í‰ÙÖLª¨HîQEmð�Ë}iÂáæC�ó¹ Ýc±ÄgûYZ.shstrtab.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.init_array.fini_array.data.rel.ro.dynamic.got.got.plt.bss.gnu.build.attributes.gnu_debuglink.gnu_debugdata ÈÈ$öÿÿoðð4( ((Ð0øø8ÿÿÿoúú<Eþÿÿo880ThhØ^B@ @ hP P cp p pnàà? t   z00h‚˜˜¬�HH¸š�, �,¦˜, ˜,² ,  ,P ¿ð- ð-àÈÐ/ Ð/ Í0 0ÈÖÈ0 È0ÛÐ0`È0$ñì0$1àð4PK;½N]CMËJ¤ ¤ lualib/text_format.luanu„[µü¤-- -------------------------------------------------------------------------------- -- FILE: text_format.lua -- DESCRIPTION: protoc-gen-lua -- Google's Protocol Buffers project, ported to lua. -- https://code.google.com/p/protoc-gen-lua/ -- -- Copyright (c) 2010 , æž—å�“毅 (Zhuoyi Lin) netsnail@gmail.com -- All rights reserved. -- -- Use, modification and distribution are subject to the "New BSD License" -- as listed at . -- COMPANY: NetEase -- CREATED: 2010å¹´08月05æ—¥ 15æ—¶14分13ç§’ CST -------------------------------------------------------------------------------- -- local string = string local math = math local print = print local getmetatable = getmetatable local table = table local ipairs = ipairs local tostring = tostring local descriptor = require "descriptor" module "text_format" function format(buffer) local len = string.len( buffer ) for i = 1, len, 16 do local text = "" for j = i, math.min( i + 16 - 1, len ) do text = string.format( "%s %02x", text, string.byte( buffer, j ) ) end print( text ) end end local FieldDescriptor = descriptor.FieldDescriptor msg_format_indent = function(write, msg, indent) for field, value in msg:ListFields() do local print_field = function(field_value) local name = field.name write(string.rep(" ", indent)) if field.type == FieldDescriptor.TYPE_MESSAGE then local extensions = getmetatable(msg)._extensions_by_name if extensions[field.full_name] then write("[" .. name .. "] {\n") else write(name .. " {\n") end msg_format_indent(write, field_value, indent + 4) write(string.rep(" ", indent)) write("}\n") else write(string.format("%s: %s\n", name, tostring(field_value))) end end if field.label == FieldDescriptor.LABEL_REPEATED then for _, k in ipairs(value) do print_field(k) end else print_field(value) end end end function msg_format(msg) local out = {} local write = function(value) out[#out + 1] = value end msg_format_indent(write, msg, 0) return table.concat(out) end PK;½N]!®ó7QBQBlualib/ipset_message_pb.luanu„[µü¤-- Generated By protoc-gen-lua Do not Edit local protobuf = require "protobuf" module('ipset_message_pb') local HEADER = protobuf.Descriptor(); local HEADER_NAME_FIELD = protobuf.FieldDescriptor(); local HEADER_VALUE_FIELD = protobuf.FieldDescriptor(); local REQUEST = protobuf.Descriptor(); local REQUEST_IP_FIELD = protobuf.FieldDescriptor(); local REQUEST_UA_FIELD = protobuf.FieldDescriptor(); local REQUEST_URL_FIELD = protobuf.FieldDescriptor(); local REQUEST_UID_FIELD = protobuf.FieldDescriptor(); local REQUEST_HEADER_FIELD = protobuf.FieldDescriptor(); local REQUEST_CAPTCHA_FIELD = protobuf.FieldDescriptor(); local REQUEST_HOST_FIELD = protobuf.FieldDescriptor(); local REQUEST_LOCALE_FIELD = protobuf.FieldDescriptor(); local REQUEST_PORT_FIELD = protobuf.FieldDescriptor(); local REQUEST_PROXYNAME_FIELD = protobuf.FieldDescriptor(); local REQUEST_REALIP_FIELD = protobuf.FieldDescriptor(); local REQUEST_SPLASHCAPTCHA_FIELD = protobuf.FieldDescriptor(); local REQUEST_WLDOMAIN_FIELD = protobuf.FieldDescriptor(); local SPLASHREDIRECT = protobuf.Descriptor(); local SPLASHREDIRECT_LOCATION_FIELD = protobuf.FieldDescriptor(); local SPLASHREDIRECT_COOKIE_FIELD = protobuf.FieldDescriptor(); local RESPONSE = protobuf.Descriptor(); local RESPONSE_STATUS = protobuf.EnumDescriptor(); local RESPONSE_STATUS_OK_ENUM = protobuf.EnumValueDescriptor(); local RESPONSE_STATUS_FAIL_ENUM = protobuf.EnumValueDescriptor(); local RESPONSE_ACTION = protobuf.EnumDescriptor(); local RESPONSE_ACTION_NOTFOUND_ENUM = protobuf.EnumValueDescriptor(); local RESPONSE_ACTION_PASS_ENUM = protobuf.EnumValueDescriptor(); local RESPONSE_ACTION_WHITE_ENUM = protobuf.EnumValueDescriptor(); local RESPONSE_ACTION_REMOTE_PROXY_ENUM = protobuf.EnumValueDescriptor(); local RESPONSE_ACTION_WHITE_STATIC_ENUM = protobuf.EnumValueDescriptor(); local RESPONSE_ACTION_DENY_ENUM = protobuf.EnumValueDescriptor(); local RESPONSE_ACTION_COUNTRY_BLACK_DENY_ENUM = protobuf.EnumValueDescriptor(); local RESPONSE_ACTION_DENY_LOCAL_ENUM = protobuf.EnumValueDescriptor(); local RESPONSE_ACTION_GRAYLIST_ENUM = protobuf.EnumValueDescriptor(); local RESPONSE_ACTION_GRAYLIST_PASS_ENUM = protobuf.EnumValueDescriptor(); local RESPONSE_ACTION_UNSUPPORTED_TYPE_ENUM = protobuf.EnumValueDescriptor(); local RESPONSE_ACTION_SPLASH_ENUM = protobuf.EnumValueDescriptor(); local RESPONSE_ACTION_SPLASH_PASS_ENUM = protobuf.EnumValueDescriptor(); local RESPONSE_ACTION_BADREQ_ENUM = protobuf.EnumValueDescriptor(); local RESPONSE_IP_FIELD = protobuf.FieldDescriptor(); local RESPONSE_STATUS_FIELD = protobuf.FieldDescriptor(); local RESPONSE_ACTION_FIELD = protobuf.FieldDescriptor(); local RESPONSE_SPLASHSCREEN_FIELD = protobuf.FieldDescriptor(); local RESPONSE_SPLASHREDIRECT_FIELD = protobuf.FieldDescriptor(); local RESPONSE_REALIP_FIELD = protobuf.FieldDescriptor(); local RESPONSE_HEADER_FIELD = protobuf.FieldDescriptor(); local RESPONSE_CAPTCHAPAGE_FIELD = protobuf.FieldDescriptor(); local RESPONSE_INTERNALHEADERS_FIELD = protobuf.FieldDescriptor(); HEADER_NAME_FIELD.name = "name" HEADER_NAME_FIELD.full_name = ".msg.Header.name" HEADER_NAME_FIELD.number = 1 HEADER_NAME_FIELD.index = 0 HEADER_NAME_FIELD.label = 2 HEADER_NAME_FIELD.has_default_value = false HEADER_NAME_FIELD.default_value = "" HEADER_NAME_FIELD.type = 9 HEADER_NAME_FIELD.cpp_type = 9 HEADER_VALUE_FIELD.name = "value" HEADER_VALUE_FIELD.full_name = ".msg.Header.value" HEADER_VALUE_FIELD.number = 2 HEADER_VALUE_FIELD.index = 1 HEADER_VALUE_FIELD.label = 1 HEADER_VALUE_FIELD.has_default_value = false HEADER_VALUE_FIELD.default_value = "" HEADER_VALUE_FIELD.type = 9 HEADER_VALUE_FIELD.cpp_type = 9 HEADER.name = "Header" HEADER.full_name = ".msg.Header" HEADER.nested_types = {} HEADER.enum_types = {} HEADER.fields = {HEADER_NAME_FIELD, HEADER_VALUE_FIELD} HEADER.is_extendable = false HEADER.extensions = {} REQUEST_IP_FIELD.name = "ip" REQUEST_IP_FIELD.full_name = ".msg.Request.ip" REQUEST_IP_FIELD.number = 1 REQUEST_IP_FIELD.index = 0 REQUEST_IP_FIELD.label = 2 REQUEST_IP_FIELD.has_default_value = false REQUEST_IP_FIELD.default_value = "" REQUEST_IP_FIELD.type = 9 REQUEST_IP_FIELD.cpp_type = 9 REQUEST_UA_FIELD.name = "ua" REQUEST_UA_FIELD.full_name = ".msg.Request.ua" REQUEST_UA_FIELD.number = 2 REQUEST_UA_FIELD.index = 1 REQUEST_UA_FIELD.label = 2 REQUEST_UA_FIELD.has_default_value = false REQUEST_UA_FIELD.default_value = "" REQUEST_UA_FIELD.type = 9 REQUEST_UA_FIELD.cpp_type = 9 REQUEST_URL_FIELD.name = "url" REQUEST_URL_FIELD.full_name = ".msg.Request.url" REQUEST_URL_FIELD.number = 3 REQUEST_URL_FIELD.index = 2 REQUEST_URL_FIELD.label = 2 REQUEST_URL_FIELD.has_default_value = false REQUEST_URL_FIELD.default_value = "" REQUEST_URL_FIELD.type = 9 REQUEST_URL_FIELD.cpp_type = 9 REQUEST_UID_FIELD.name = "uid" REQUEST_UID_FIELD.full_name = ".msg.Request.uid" REQUEST_UID_FIELD.number = 4 REQUEST_UID_FIELD.index = 3 REQUEST_UID_FIELD.label = 2 REQUEST_UID_FIELD.has_default_value = false REQUEST_UID_FIELD.default_value = "" REQUEST_UID_FIELD.type = 9 REQUEST_UID_FIELD.cpp_type = 9 REQUEST_HEADER_FIELD.name = "header" REQUEST_HEADER_FIELD.full_name = ".msg.Request.header" REQUEST_HEADER_FIELD.number = 5 REQUEST_HEADER_FIELD.index = 4 REQUEST_HEADER_FIELD.label = 3 REQUEST_HEADER_FIELD.has_default_value = false REQUEST_HEADER_FIELD.default_value = {} REQUEST_HEADER_FIELD.message_type = HEADER REQUEST_HEADER_FIELD.type = 11 REQUEST_HEADER_FIELD.cpp_type = 10 REQUEST_CAPTCHA_FIELD.name = "captcha" REQUEST_CAPTCHA_FIELD.full_name = ".msg.Request.captcha" REQUEST_CAPTCHA_FIELD.number = 6 REQUEST_CAPTCHA_FIELD.index = 5 REQUEST_CAPTCHA_FIELD.label = 2 REQUEST_CAPTCHA_FIELD.has_default_value = false REQUEST_CAPTCHA_FIELD.default_value = "" REQUEST_CAPTCHA_FIELD.type = 9 REQUEST_CAPTCHA_FIELD.cpp_type = 9 REQUEST_HOST_FIELD.name = "host" REQUEST_HOST_FIELD.full_name = ".msg.Request.host" REQUEST_HOST_FIELD.number = 7 REQUEST_HOST_FIELD.index = 6 REQUEST_HOST_FIELD.label = 2 REQUEST_HOST_FIELD.has_default_value = false REQUEST_HOST_FIELD.default_value = "" REQUEST_HOST_FIELD.type = 9 REQUEST_HOST_FIELD.cpp_type = 9 REQUEST_LOCALE_FIELD.name = "locale" REQUEST_LOCALE_FIELD.full_name = ".msg.Request.locale" REQUEST_LOCALE_FIELD.number = 8 REQUEST_LOCALE_FIELD.index = 7 REQUEST_LOCALE_FIELD.label = 1 REQUEST_LOCALE_FIELD.has_default_value = false REQUEST_LOCALE_FIELD.default_value = "" REQUEST_LOCALE_FIELD.type = 9 REQUEST_LOCALE_FIELD.cpp_type = 9 REQUEST_PORT_FIELD.name = "port" REQUEST_PORT_FIELD.full_name = ".msg.Request.port" REQUEST_PORT_FIELD.number = 9 REQUEST_PORT_FIELD.index = 8 REQUEST_PORT_FIELD.label = 1 REQUEST_PORT_FIELD.has_default_value = false REQUEST_PORT_FIELD.default_value = "" REQUEST_PORT_FIELD.type = 9 REQUEST_PORT_FIELD.cpp_type = 9 REQUEST_PROXYNAME_FIELD.name = "proxyname" REQUEST_PROXYNAME_FIELD.full_name = ".msg.Request.proxyname" REQUEST_PROXYNAME_FIELD.number = 10 REQUEST_PROXYNAME_FIELD.index = 9 REQUEST_PROXYNAME_FIELD.label = 1 REQUEST_PROXYNAME_FIELD.has_default_value = false REQUEST_PROXYNAME_FIELD.default_value = "" REQUEST_PROXYNAME_FIELD.type = 9 REQUEST_PROXYNAME_FIELD.cpp_type = 9 REQUEST_REALIP_FIELD.name = "realip" REQUEST_REALIP_FIELD.full_name = ".msg.Request.realip" REQUEST_REALIP_FIELD.number = 11 REQUEST_REALIP_FIELD.index = 10 REQUEST_REALIP_FIELD.label = 1 REQUEST_REALIP_FIELD.has_default_value = false REQUEST_REALIP_FIELD.default_value = "" REQUEST_REALIP_FIELD.type = 9 REQUEST_REALIP_FIELD.cpp_type = 9 REQUEST_SPLASHCAPTCHA_FIELD.name = "splashcaptcha" REQUEST_SPLASHCAPTCHA_FIELD.full_name = ".msg.Request.splashcaptcha" REQUEST_SPLASHCAPTCHA_FIELD.number = 12 REQUEST_SPLASHCAPTCHA_FIELD.index = 11 REQUEST_SPLASHCAPTCHA_FIELD.label = 1 REQUEST_SPLASHCAPTCHA_FIELD.has_default_value = false REQUEST_SPLASHCAPTCHA_FIELD.default_value = false REQUEST_SPLASHCAPTCHA_FIELD.type = 8 REQUEST_SPLASHCAPTCHA_FIELD.cpp_type = 7 REQUEST_WLDOMAIN_FIELD.name = "wldomain" REQUEST_WLDOMAIN_FIELD.full_name = ".msg.Request.wldomain" REQUEST_WLDOMAIN_FIELD.number = 13 REQUEST_WLDOMAIN_FIELD.index = 12 REQUEST_WLDOMAIN_FIELD.label = 1 REQUEST_WLDOMAIN_FIELD.has_default_value = false REQUEST_WLDOMAIN_FIELD.default_value = false REQUEST_WLDOMAIN_FIELD.type = 8 REQUEST_WLDOMAIN_FIELD.cpp_type = 7 REQUEST.name = "Request" REQUEST.full_name = ".msg.Request" REQUEST.nested_types = {} REQUEST.enum_types = {} REQUEST.fields = {REQUEST_IP_FIELD, REQUEST_UA_FIELD, REQUEST_URL_FIELD, REQUEST_UID_FIELD, REQUEST_HEADER_FIELD, REQUEST_CAPTCHA_FIELD, REQUEST_HOST_FIELD, REQUEST_LOCALE_FIELD, REQUEST_PORT_FIELD, REQUEST_PROXYNAME_FIELD, REQUEST_REALIP_FIELD, REQUEST_SPLASHCAPTCHA_FIELD, REQUEST_WLDOMAIN_FIELD} REQUEST.is_extendable = false REQUEST.extensions = {} SPLASHREDIRECT_LOCATION_FIELD.name = "location" SPLASHREDIRECT_LOCATION_FIELD.full_name = ".msg.SplashRedirect.location" SPLASHREDIRECT_LOCATION_FIELD.number = 1 SPLASHREDIRECT_LOCATION_FIELD.index = 0 SPLASHREDIRECT_LOCATION_FIELD.label = 2 SPLASHREDIRECT_LOCATION_FIELD.has_default_value = false SPLASHREDIRECT_LOCATION_FIELD.default_value = "" SPLASHREDIRECT_LOCATION_FIELD.type = 9 SPLASHREDIRECT_LOCATION_FIELD.cpp_type = 9 SPLASHREDIRECT_COOKIE_FIELD.name = "cookie" SPLASHREDIRECT_COOKIE_FIELD.full_name = ".msg.SplashRedirect.cookie" SPLASHREDIRECT_COOKIE_FIELD.number = 2 SPLASHREDIRECT_COOKIE_FIELD.index = 1 SPLASHREDIRECT_COOKIE_FIELD.label = 2 SPLASHREDIRECT_COOKIE_FIELD.has_default_value = false SPLASHREDIRECT_COOKIE_FIELD.default_value = "" SPLASHREDIRECT_COOKIE_FIELD.type = 9 SPLASHREDIRECT_COOKIE_FIELD.cpp_type = 9 SPLASHREDIRECT.name = "SplashRedirect" SPLASHREDIRECT.full_name = ".msg.SplashRedirect" SPLASHREDIRECT.nested_types = {} SPLASHREDIRECT.enum_types = {} SPLASHREDIRECT.fields = {SPLASHREDIRECT_LOCATION_FIELD, SPLASHREDIRECT_COOKIE_FIELD} SPLASHREDIRECT.is_extendable = false SPLASHREDIRECT.extensions = {} RESPONSE_STATUS_OK_ENUM.name = "OK" RESPONSE_STATUS_OK_ENUM.index = 0 RESPONSE_STATUS_OK_ENUM.number = 0 RESPONSE_STATUS_FAIL_ENUM.name = "FAIL" RESPONSE_STATUS_FAIL_ENUM.index = 1 RESPONSE_STATUS_FAIL_ENUM.number = 1 RESPONSE_STATUS.name = "Status" RESPONSE_STATUS.full_name = ".msg.Response.Status" RESPONSE_STATUS.values = {RESPONSE_STATUS_OK_ENUM,RESPONSE_STATUS_FAIL_ENUM} RESPONSE_ACTION_NOTFOUND_ENUM.name = "NOTFOUND" RESPONSE_ACTION_NOTFOUND_ENUM.index = 0 RESPONSE_ACTION_NOTFOUND_ENUM.number = 0 RESPONSE_ACTION_PASS_ENUM.name = "PASS" RESPONSE_ACTION_PASS_ENUM.index = 1 RESPONSE_ACTION_PASS_ENUM.number = 1 RESPONSE_ACTION_WHITE_ENUM.name = "WHITE" RESPONSE_ACTION_WHITE_ENUM.index = 2 RESPONSE_ACTION_WHITE_ENUM.number = 10 RESPONSE_ACTION_REMOTE_PROXY_ENUM.name = "REMOTE_PROXY" RESPONSE_ACTION_REMOTE_PROXY_ENUM.index = 3 RESPONSE_ACTION_REMOTE_PROXY_ENUM.number = 11 RESPONSE_ACTION_WHITE_STATIC_ENUM.name = "WHITE_STATIC" RESPONSE_ACTION_WHITE_STATIC_ENUM.index = 4 RESPONSE_ACTION_WHITE_STATIC_ENUM.number = 12 RESPONSE_ACTION_DENY_ENUM.name = "DENY" RESPONSE_ACTION_DENY_ENUM.index = 5 RESPONSE_ACTION_DENY_ENUM.number = 20 RESPONSE_ACTION_COUNTRY_BLACK_DENY_ENUM.name = "COUNTRY_BLACK_DENY" RESPONSE_ACTION_COUNTRY_BLACK_DENY_ENUM.index = 6 RESPONSE_ACTION_COUNTRY_BLACK_DENY_ENUM.number = 21 RESPONSE_ACTION_DENY_LOCAL_ENUM.name = "DENY_LOCAL" RESPONSE_ACTION_DENY_LOCAL_ENUM.index = 7 RESPONSE_ACTION_DENY_LOCAL_ENUM.number = 22 RESPONSE_ACTION_GRAYLIST_ENUM.name = "GRAYLIST" RESPONSE_ACTION_GRAYLIST_ENUM.index = 8 RESPONSE_ACTION_GRAYLIST_ENUM.number = 30 RESPONSE_ACTION_GRAYLIST_PASS_ENUM.name = "GRAYLIST_PASS" RESPONSE_ACTION_GRAYLIST_PASS_ENUM.index = 9 RESPONSE_ACTION_GRAYLIST_PASS_ENUM.number = 31 RESPONSE_ACTION_UNSUPPORTED_TYPE_ENUM.name = "UNSUPPORTED_TYPE" RESPONSE_ACTION_UNSUPPORTED_TYPE_ENUM.index = 10 RESPONSE_ACTION_UNSUPPORTED_TYPE_ENUM.number = 32 RESPONSE_ACTION_SPLASH_ENUM.name = "SPLASH" RESPONSE_ACTION_SPLASH_ENUM.index = 11 RESPONSE_ACTION_SPLASH_ENUM.number = 40 RESPONSE_ACTION_SPLASH_PASS_ENUM.name = "SPLASH_PASS" RESPONSE_ACTION_SPLASH_PASS_ENUM.index = 12 RESPONSE_ACTION_SPLASH_PASS_ENUM.number = 41 RESPONSE_ACTION_BADREQ_ENUM.name = "BADREQ" RESPONSE_ACTION_BADREQ_ENUM.index = 13 RESPONSE_ACTION_BADREQ_ENUM.number = 50 RESPONSE_ACTION.name = "Action" RESPONSE_ACTION.full_name = ".msg.Response.Action" RESPONSE_ACTION.values = {RESPONSE_ACTION_NOTFOUND_ENUM,RESPONSE_ACTION_PASS_ENUM,RESPONSE_ACTION_WHITE_ENUM,RESPONSE_ACTION_REMOTE_PROXY_ENUM,RESPONSE_ACTION_WHITE_STATIC_ENUM,RESPONSE_ACTION_DENY_ENUM,RESPONSE_ACTION_COUNTRY_BLACK_DENY_ENUM,RESPONSE_ACTION_DENY_LOCAL_ENUM,RESPONSE_ACTION_GRAYLIST_ENUM,RESPONSE_ACTION_GRAYLIST_PASS_ENUM,RESPONSE_ACTION_UNSUPPORTED_TYPE_ENUM,RESPONSE_ACTION_SPLASH_ENUM,RESPONSE_ACTION_SPLASH_PASS_ENUM,RESPONSE_ACTION_BADREQ_ENUM} RESPONSE_IP_FIELD.name = "ip" RESPONSE_IP_FIELD.full_name = ".msg.Response.ip" RESPONSE_IP_FIELD.number = 1 RESPONSE_IP_FIELD.index = 0 RESPONSE_IP_FIELD.label = 2 RESPONSE_IP_FIELD.has_default_value = false RESPONSE_IP_FIELD.default_value = "" RESPONSE_IP_FIELD.type = 9 RESPONSE_IP_FIELD.cpp_type = 9 RESPONSE_STATUS_FIELD.name = "status" RESPONSE_STATUS_FIELD.full_name = ".msg.Response.status" RESPONSE_STATUS_FIELD.number = 2 RESPONSE_STATUS_FIELD.index = 1 RESPONSE_STATUS_FIELD.label = 2 RESPONSE_STATUS_FIELD.has_default_value = false RESPONSE_STATUS_FIELD.default_value = nil RESPONSE_STATUS_FIELD.enum_type = RESPONSE_STATUS RESPONSE_STATUS_FIELD.type = 14 RESPONSE_STATUS_FIELD.cpp_type = 8 RESPONSE_ACTION_FIELD.name = "action" RESPONSE_ACTION_FIELD.full_name = ".msg.Response.action" RESPONSE_ACTION_FIELD.number = 3 RESPONSE_ACTION_FIELD.index = 2 RESPONSE_ACTION_FIELD.label = 1 RESPONSE_ACTION_FIELD.has_default_value = false RESPONSE_ACTION_FIELD.default_value = nil RESPONSE_ACTION_FIELD.enum_type = RESPONSE_ACTION RESPONSE_ACTION_FIELD.type = 14 RESPONSE_ACTION_FIELD.cpp_type = 8 RESPONSE_SPLASHSCREEN_FIELD.name = "splashscreen" RESPONSE_SPLASHSCREEN_FIELD.full_name = ".msg.Response.splashscreen" RESPONSE_SPLASHSCREEN_FIELD.number = 4 RESPONSE_SPLASHSCREEN_FIELD.index = 3 RESPONSE_SPLASHSCREEN_FIELD.label = 1 RESPONSE_SPLASHSCREEN_FIELD.has_default_value = false RESPONSE_SPLASHSCREEN_FIELD.default_value = "" RESPONSE_SPLASHSCREEN_FIELD.type = 9 RESPONSE_SPLASHSCREEN_FIELD.cpp_type = 9 RESPONSE_SPLASHREDIRECT_FIELD.name = "splashredirect" RESPONSE_SPLASHREDIRECT_FIELD.full_name = ".msg.Response.splashredirect" RESPONSE_SPLASHREDIRECT_FIELD.number = 5 RESPONSE_SPLASHREDIRECT_FIELD.index = 4 RESPONSE_SPLASHREDIRECT_FIELD.label = 1 RESPONSE_SPLASHREDIRECT_FIELD.has_default_value = false RESPONSE_SPLASHREDIRECT_FIELD.default_value = nil RESPONSE_SPLASHREDIRECT_FIELD.message_type = SPLASHREDIRECT RESPONSE_SPLASHREDIRECT_FIELD.type = 11 RESPONSE_SPLASHREDIRECT_FIELD.cpp_type = 10 RESPONSE_REALIP_FIELD.name = "realIp" RESPONSE_REALIP_FIELD.full_name = ".msg.Response.realIp" RESPONSE_REALIP_FIELD.number = 6 RESPONSE_REALIP_FIELD.index = 5 RESPONSE_REALIP_FIELD.label = 1 RESPONSE_REALIP_FIELD.has_default_value = false RESPONSE_REALIP_FIELD.default_value = "" RESPONSE_REALIP_FIELD.type = 9 RESPONSE_REALIP_FIELD.cpp_type = 9 RESPONSE_HEADER_FIELD.name = "header" RESPONSE_HEADER_FIELD.full_name = ".msg.Response.header" RESPONSE_HEADER_FIELD.number = 7 RESPONSE_HEADER_FIELD.index = 6 RESPONSE_HEADER_FIELD.label = 3 RESPONSE_HEADER_FIELD.has_default_value = false RESPONSE_HEADER_FIELD.default_value = {} RESPONSE_HEADER_FIELD.message_type = HEADER RESPONSE_HEADER_FIELD.type = 11 RESPONSE_HEADER_FIELD.cpp_type = 10 RESPONSE_CAPTCHAPAGE_FIELD.name = "captchapage" RESPONSE_CAPTCHAPAGE_FIELD.full_name = ".msg.Response.captchapage" RESPONSE_CAPTCHAPAGE_FIELD.number = 8 RESPONSE_CAPTCHAPAGE_FIELD.index = 7 RESPONSE_CAPTCHAPAGE_FIELD.label = 1 RESPONSE_CAPTCHAPAGE_FIELD.has_default_value = false RESPONSE_CAPTCHAPAGE_FIELD.default_value = "" RESPONSE_CAPTCHAPAGE_FIELD.type = 9 RESPONSE_CAPTCHAPAGE_FIELD.cpp_type = 9 RESPONSE_INTERNALHEADERS_FIELD.name = "internalHeaders" RESPONSE_INTERNALHEADERS_FIELD.full_name = ".msg.Response.internalHeaders" RESPONSE_INTERNALHEADERS_FIELD.number = 9 RESPONSE_INTERNALHEADERS_FIELD.index = 8 RESPONSE_INTERNALHEADERS_FIELD.label = 3 RESPONSE_INTERNALHEADERS_FIELD.has_default_value = false RESPONSE_INTERNALHEADERS_FIELD.default_value = {} RESPONSE_INTERNALHEADERS_FIELD.message_type = HEADER RESPONSE_INTERNALHEADERS_FIELD.type = 11 RESPONSE_INTERNALHEADERS_FIELD.cpp_type = 10 RESPONSE.name = "Response" RESPONSE.full_name = ".msg.Response" RESPONSE.nested_types = {} RESPONSE.enum_types = {RESPONSE_STATUS, RESPONSE_ACTION} RESPONSE.fields = {RESPONSE_IP_FIELD, RESPONSE_STATUS_FIELD, RESPONSE_ACTION_FIELD, RESPONSE_SPLASHSCREEN_FIELD, RESPONSE_SPLASHREDIRECT_FIELD, RESPONSE_REALIP_FIELD, RESPONSE_HEADER_FIELD, RESPONSE_CAPTCHAPAGE_FIELD, RESPONSE_INTERNALHEADERS_FIELD} RESPONSE.is_extendable = false RESPONSE.extensions = {} Header = protobuf.Message(HEADER) Request = protobuf.Message(REQUEST) Response = protobuf.Message(RESPONSE) SplashRedirect = protobuf.Message(SPLASHREDIRECT) PK;½N]\ Zñ‰ñ‰lualib/protobuf.luanu„[µü¤-- -------------------------------------------------------------------------------- -- FILE: protobuf.lua -- DESCRIPTION: protoc-gen-lua -- Google's Protocol Buffers project, ported to lua. -- https://code.google.com/p/protoc-gen-lua/ -- -- Copyright (c) 2010 , æž—å�“毅 (Zhuoyi Lin) netsnail@gmail.com -- All rights reserved. -- -- Use, modification and distribution are subject to the "New BSD License" -- as listed at . -- -- COMPANY: NetEase -- CREATED: 2010å¹´07月29æ—¥ 14æ—¶30分02ç§’ CST -------------------------------------------------------------------------------- -- local setmetatable = setmetatable local rawset = rawset local rawget = rawget local error = error local ipairs = ipairs local pairs = pairs local print = print local table = table local string = string local tostring = tostring local type = type local pb = require "pb" local wire_format = require "wire_format" local type_checkers = require "type_checkers" local encoder = require "encoder" local decoder = require "decoder" local listener_mod = require "listener" local containers = require "containers" local descriptor = require "descriptor" local FieldDescriptor = descriptor.FieldDescriptor local text_format = require "text_format" module("protobuf") local function make_descriptor(name, descriptor, usable_key) local meta = { __newindex = function(self, key, value) if usable_key[key] then rawset(self, key, value) else error("error key: "..key) end end }; meta.__index = meta meta.__call = function() return setmetatable({}, meta) end _M[name] = setmetatable(descriptor, meta); end make_descriptor("Descriptor", {}, { name = true, full_name = true, filename = true, containing_type = true, fields = true, nested_types = true, enum_types = true, extensions = true, options = true, is_extendable = true, extension_ranges = true, }) make_descriptor("FieldDescriptor", FieldDescriptor, { name = true, full_name = true, index = true, number = true, type = true, cpp_type = true, label = true, has_default_value = true, default_value = true, containing_type = true, message_type = true, enum_type = true, is_extension = true, extension_scope = true, }) make_descriptor("EnumDescriptor", {}, { name = true, full_name = true, values = true, containing_type = true, options = true }) make_descriptor("EnumValueDescriptor", {}, { name = true, index = true, number = true, type = true, options = true }) -- Maps from field type to expected wiretype. local FIELD_TYPE_TO_WIRE_TYPE = { [FieldDescriptor.TYPE_DOUBLE] = wire_format.WIRETYPE_FIXED64, [FieldDescriptor.TYPE_FLOAT] = wire_format.WIRETYPE_FIXED32, [FieldDescriptor.TYPE_INT64] = wire_format.WIRETYPE_VARINT, [FieldDescriptor.TYPE_UINT64] = wire_format.WIRETYPE_VARINT, [FieldDescriptor.TYPE_INT32] = wire_format.WIRETYPE_VARINT, [FieldDescriptor.TYPE_FIXED64] = wire_format.WIRETYPE_FIXED64, [FieldDescriptor.TYPE_FIXED32] = wire_format.WIRETYPE_FIXED32, [FieldDescriptor.TYPE_BOOL] = wire_format.WIRETYPE_VARINT, [FieldDescriptor.TYPE_STRING] = wire_format.WIRETYPE_LENGTH_DELIMITED, [FieldDescriptor.TYPE_GROUP] = wire_format.WIRETYPE_START_GROUP, [FieldDescriptor.TYPE_MESSAGE] = wire_format.WIRETYPE_LENGTH_DELIMITED, [FieldDescriptor.TYPE_BYTES] = wire_format.WIRETYPE_LENGTH_DELIMITED, [FieldDescriptor.TYPE_UINT32] = wire_format.WIRETYPE_VARINT, [FieldDescriptor.TYPE_ENUM] = wire_format.WIRETYPE_VARINT, [FieldDescriptor.TYPE_SFIXED32] = wire_format.WIRETYPE_FIXED32, [FieldDescriptor.TYPE_SFIXED64] = wire_format.WIRETYPE_FIXED64, [FieldDescriptor.TYPE_SINT32] = wire_format.WIRETYPE_VARINT, [FieldDescriptor.TYPE_SINT64] = wire_format.WIRETYPE_VARINT } local NON_PACKABLE_TYPES = { [FieldDescriptor.TYPE_STRING] = true, [FieldDescriptor.TYPE_GROUP] = true, [FieldDescriptor.TYPE_MESSAGE] = true, [FieldDescriptor.TYPE_BYTES] = true } local _VALUE_CHECKERS = { [FieldDescriptor.CPPTYPE_INT32] = type_checkers.Int32ValueChecker(), [FieldDescriptor.CPPTYPE_INT64] = type_checkers.Int32ValueChecker(), [FieldDescriptor.CPPTYPE_UINT32] = type_checkers.Uint32ValueChecker(), [FieldDescriptor.CPPTYPE_UINT64] = type_checkers.Uint32ValueChecker(), [FieldDescriptor.CPPTYPE_DOUBLE] = type_checkers.TypeChecker({number = true}), [FieldDescriptor.CPPTYPE_FLOAT] = type_checkers.TypeChecker({number = true}), [FieldDescriptor.CPPTYPE_BOOL] = type_checkers.TypeChecker({boolean = true, bool = true, int=true}), [FieldDescriptor.CPPTYPE_ENUM] = type_checkers.Int32ValueChecker(), [FieldDescriptor.CPPTYPE_STRING] = type_checkers.TypeChecker({string = true}) } local TYPE_TO_BYTE_SIZE_FN = { [FieldDescriptor.TYPE_DOUBLE] = wire_format.DoubleByteSize, [FieldDescriptor.TYPE_FLOAT] = wire_format.FloatByteSize, [FieldDescriptor.TYPE_INT64] = wire_format.Int64ByteSize, [FieldDescriptor.TYPE_UINT64] = wire_format.UInt64ByteSize, [FieldDescriptor.TYPE_INT32] = wire_format.Int32ByteSize, [FieldDescriptor.TYPE_FIXED64] = wire_format.Fixed64ByteSize, [FieldDescriptor.TYPE_FIXED32] = wire_format.Fixed32ByteSize, [FieldDescriptor.TYPE_BOOL] = wire_format.BoolByteSize, [FieldDescriptor.TYPE_STRING] = wire_format.StringByteSize, [FieldDescriptor.TYPE_GROUP] = wire_format.GroupByteSize, [FieldDescriptor.TYPE_MESSAGE] = wire_format.MessageByteSize, [FieldDescriptor.TYPE_BYTES] = wire_format.BytesByteSize, [FieldDescriptor.TYPE_UINT32] = wire_format.UInt32ByteSize, [FieldDescriptor.TYPE_ENUM] = wire_format.EnumByteSize, [FieldDescriptor.TYPE_SFIXED32] = wire_format.SFixed32ByteSize, [FieldDescriptor.TYPE_SFIXED64] = wire_format.SFixed64ByteSize, [FieldDescriptor.TYPE_SINT32] = wire_format.SInt32ByteSize, [FieldDescriptor.TYPE_SINT64] = wire_format.SInt64ByteSize } local TYPE_TO_ENCODER = { [FieldDescriptor.TYPE_DOUBLE] = encoder.DoubleEncoder, [FieldDescriptor.TYPE_FLOAT] = encoder.FloatEncoder, [FieldDescriptor.TYPE_INT64] = encoder.Int64Encoder, [FieldDescriptor.TYPE_UINT64] = encoder.UInt64Encoder, [FieldDescriptor.TYPE_INT32] = encoder.Int32Encoder, [FieldDescriptor.TYPE_FIXED64] = encoder.Fixed64Encoder, [FieldDescriptor.TYPE_FIXED32] = encoder.Fixed32Encoder, [FieldDescriptor.TYPE_BOOL] = encoder.BoolEncoder, [FieldDescriptor.TYPE_STRING] = encoder.StringEncoder, [FieldDescriptor.TYPE_GROUP] = encoder.GroupEncoder, [FieldDescriptor.TYPE_MESSAGE] = encoder.MessageEncoder, [FieldDescriptor.TYPE_BYTES] = encoder.BytesEncoder, [FieldDescriptor.TYPE_UINT32] = encoder.UInt32Encoder, [FieldDescriptor.TYPE_ENUM] = encoder.EnumEncoder, [FieldDescriptor.TYPE_SFIXED32] = encoder.SFixed32Encoder, [FieldDescriptor.TYPE_SFIXED64] = encoder.SFixed64Encoder, [FieldDescriptor.TYPE_SINT32] = encoder.SInt32Encoder, [FieldDescriptor.TYPE_SINT64] = encoder.SInt64Encoder } local TYPE_TO_SIZER = { [FieldDescriptor.TYPE_DOUBLE] = encoder.DoubleSizer, [FieldDescriptor.TYPE_FLOAT] = encoder.FloatSizer, [FieldDescriptor.TYPE_INT64] = encoder.Int64Sizer, [FieldDescriptor.TYPE_UINT64] = encoder.UInt64Sizer, [FieldDescriptor.TYPE_INT32] = encoder.Int32Sizer, [FieldDescriptor.TYPE_FIXED64] = encoder.Fixed64Sizer, [FieldDescriptor.TYPE_FIXED32] = encoder.Fixed32Sizer, [FieldDescriptor.TYPE_BOOL] = encoder.BoolSizer, [FieldDescriptor.TYPE_STRING] = encoder.StringSizer, [FieldDescriptor.TYPE_GROUP] = encoder.GroupSizer, [FieldDescriptor.TYPE_MESSAGE] = encoder.MessageSizer, [FieldDescriptor.TYPE_BYTES] = encoder.BytesSizer, [FieldDescriptor.TYPE_UINT32] = encoder.UInt32Sizer, [FieldDescriptor.TYPE_ENUM] = encoder.EnumSizer, [FieldDescriptor.TYPE_SFIXED32] = encoder.SFixed32Sizer, [FieldDescriptor.TYPE_SFIXED64] = encoder.SFixed64Sizer, [FieldDescriptor.TYPE_SINT32] = encoder.SInt32Sizer, [FieldDescriptor.TYPE_SINT64] = encoder.SInt64Sizer } local TYPE_TO_DECODER = { [FieldDescriptor.TYPE_DOUBLE] = decoder.DoubleDecoder, [FieldDescriptor.TYPE_FLOAT] = decoder.FloatDecoder, [FieldDescriptor.TYPE_INT64] = decoder.Int64Decoder, [FieldDescriptor.TYPE_UINT64] = decoder.UInt64Decoder, [FieldDescriptor.TYPE_INT32] = decoder.Int32Decoder, [FieldDescriptor.TYPE_FIXED64] = decoder.Fixed64Decoder, [FieldDescriptor.TYPE_FIXED32] = decoder.Fixed32Decoder, [FieldDescriptor.TYPE_BOOL] = decoder.BoolDecoder, [FieldDescriptor.TYPE_STRING] = decoder.StringDecoder, [FieldDescriptor.TYPE_GROUP] = decoder.GroupDecoder, [FieldDescriptor.TYPE_MESSAGE] = decoder.MessageDecoder, [FieldDescriptor.TYPE_BYTES] = decoder.BytesDecoder, [FieldDescriptor.TYPE_UINT32] = decoder.UInt32Decoder, [FieldDescriptor.TYPE_ENUM] = decoder.EnumDecoder, [FieldDescriptor.TYPE_SFIXED32] = decoder.SFixed32Decoder, [FieldDescriptor.TYPE_SFIXED64] = decoder.SFixed64Decoder, [FieldDescriptor.TYPE_SINT32] = decoder.SInt32Decoder, [FieldDescriptor.TYPE_SINT64] = decoder.SInt64Decoder } local FIELD_TYPE_TO_WIRE_TYPE = { [FieldDescriptor.TYPE_DOUBLE] = wire_format.WIRETYPE_FIXED64, [FieldDescriptor.TYPE_FLOAT] = wire_format.WIRETYPE_FIXED32, [FieldDescriptor.TYPE_INT64] = wire_format.WIRETYPE_VARINT, [FieldDescriptor.TYPE_UINT64] = wire_format.WIRETYPE_VARINT, [FieldDescriptor.TYPE_INT32] = wire_format.WIRETYPE_VARINT, [FieldDescriptor.TYPE_FIXED64] = wire_format.WIRETYPE_FIXED64, [FieldDescriptor.TYPE_FIXED32] = wire_format.WIRETYPE_FIXED32, [FieldDescriptor.TYPE_BOOL] = wire_format.WIRETYPE_VARINT, [FieldDescriptor.TYPE_STRING] = wire_format.WIRETYPE_LENGTH_DELIMITED, [FieldDescriptor.TYPE_GROUP] = wire_format.WIRETYPE_START_GROUP, [FieldDescriptor.TYPE_MESSAGE] = wire_format.WIRETYPE_LENGTH_DELIMITED, [FieldDescriptor.TYPE_BYTES] = wire_format.WIRETYPE_LENGTH_DELIMITED, [FieldDescriptor.TYPE_UINT32] = wire_format.WIRETYPE_VARINT, [FieldDescriptor.TYPE_ENUM] = wire_format.WIRETYPE_VARINT, [FieldDescriptor.TYPE_SFIXED32] = wire_format.WIRETYPE_FIXED32, [FieldDescriptor.TYPE_SFIXED64] = wire_format.WIRETYPE_FIXED64, [FieldDescriptor.TYPE_SINT32] = wire_format.WIRETYPE_VARINT, [FieldDescriptor.TYPE_SINT64] = wire_format.WIRETYPE_VARINT } local function IsTypePackable(field_type) return NON_PACKABLE_TYPES[field_type] == nil end local function GetTypeChecker(cpp_type, field_type) if (cpp_type == FieldDescriptor.CPPTYPE_STRING and field_type == FieldDescriptor.TYPE_STRING) then return type_checkers.UnicodeValueChecker() end return _VALUE_CHECKERS[cpp_type] end local function _DefaultValueConstructorForField(field) if field.label == FieldDescriptor.LABEL_REPEATED then if type(field.default_value) ~= "table" or #(field.default_value) ~= 0 then error('Repeated field default value not empty list:' .. tostring(field.default_value)) end if field.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE then local message_type = field.message_type return function (message) return containers.RepeatedCompositeFieldContainer(message._listener_for_children, message_type) end else local type_checker = GetTypeChecker(field.cpp_type, field.type) return function (message) return containers.RepeatedScalarFieldContainer(message._listener_for_children, type_checker) end end end if field.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE then local message_type = field.message_type return function (message) result = message_type._concrete_class() result._SetListener(message._listener_for_children) return result end end return function (message) return field.default_value end end local function _AttachFieldHelpers(message_meta, field_descriptor) local is_repeated = (field_descriptor.label == FieldDescriptor.LABEL_REPEATED) local is_packed = (field_descriptor.has_options and field_descriptor.GetOptions().packed) rawset(field_descriptor, "_encoder", TYPE_TO_ENCODER[field_descriptor.type](field_descriptor.number, is_repeated, is_packed)) rawset(field_descriptor, "_sizer", TYPE_TO_SIZER[field_descriptor.type](field_descriptor.number, is_repeated, is_packed)) rawset(field_descriptor, "_default_constructor", _DefaultValueConstructorForField(field_descriptor)) local AddDecoder = function(wiretype, is_packed) local tag_bytes = encoder.TagBytes(field_descriptor.number, wiretype) message_meta._decoders_by_tag[tag_bytes] = TYPE_TO_DECODER[field_descriptor.type](field_descriptor.number, is_repeated, is_packed, field_descriptor, field_descriptor._default_constructor) end AddDecoder(FIELD_TYPE_TO_WIRE_TYPE[field_descriptor.type], False) if is_repeated and IsTypePackable(field_descriptor.type) then AddDecoder(wire_format.WIRETYPE_LENGTH_DELIMITED, True) end end local function _AddEnumValues(descriptor, message_meta) for _, enum_type in ipairs(descriptor.enum_types) do for _, enum_value in ipairs(enum_type.values) do message_meta._member[enum_value.name] = enum_value.number end end end local function _InitMethod(message_meta) return function() local self = {} self._cached_byte_size = 0 self._cached_byte_size_dirty = false self._fields = {} self._is_present_in_parent = false self._listener = listener_mod.NullMessageListener() self._listener_for_children = listener_mod.Listener(self) return setmetatable(self, message_meta) end end local function _AddPropertiesForRepeatedField(field, message_meta) local property_name = field.name message_meta._getter[property_name] = function(self) local field_value = self._fields[field] if field_value == nil then field_value = field._default_constructor(self) self._fields[field] = field_value end return field_value end message_meta._setter[property_name] = function(self) error('Assignment not allowed to repeated field "' .. property_name .. '" in protocol message object.') end end local function _AddPropertiesForNonRepeatedCompositeField(field, message_meta) local property_name = field.name local message_type = field.message_type message_meta._getter[property_name] = function(self) local field_value = self._fields[field] if field_value == nil then field_value = message_type._concrete_class() field_value:_SetListener(self._listener_for_children) self._fields[field] = field_value end return field_value end message_meta._setter[property_name] = function(self, new_value) error('Assignment not allowed to composite field' .. property_name .. 'in protocol message object.' ) end end local function _AddPropertiesForNonRepeatedScalarField(field, message) local property_name = field.name local type_checker = GetTypeChecker(field.cpp_type, field.type) local default_value = field.default_value message._getter[property_name] = function(self) local value = self._fields[field] if value ~= nil then return self._fields[field] else return default_value end end message._setter[property_name] = function(self, new_value) type_checker(new_value) self._fields[field] = new_value if not self._cached_byte_size_dirty then message._member._Modified(self) end end end local function _AddPropertiesForField(field, message_meta) constant_name = field.name:upper() .. "_FIELD_NUMBER" message_meta._member[constant_name] = field.number if field.label == FieldDescriptor.LABEL_REPEATED then _AddPropertiesForRepeatedField(field, message_meta) elseif field.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE then _AddPropertiesForNonRepeatedCompositeField(field, message_meta) else _AddPropertiesForNonRepeatedScalarField(field, message_meta) end end local _ED_meta = { __index = function(self, extension_handle) local _extended_message = rawget(self, "_extended_message") local value = _extended_message._fields[extension_handle] if value ~= nil then return value end if extension_handle.label == FieldDescriptor.LABEL_REPEATED then value = extension_handle._default_constructor(self._extended_message) elseif extension_handle.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE then value = extension_handle.message_type._concrete_class() value:_SetListener(_extended_message._listener_for_children) else return extension_handle.default_value end _extended_message._fields[extension_handle] = value return value end, __newindex = function(self, extension_handle, value) local _extended_message = rawget(self, "_extended_message") if (extension_handle.label == FieldDescriptor.LABEL_REPEATED or extension_handle.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE) then error('Cannot assign to extension "'.. extension_handle.full_name .. '" because it is a repeated or composite type.') end local type_checker = GetTypeChecker(extension_handle.cpp_type, extension_handle.type) type_checker.CheckValue(value) _extended_message._fields[extension_handle] = value _extended_message._Modified() end } local function _ExtensionDict(message) local o = {} o._extended_message = message return setmetatable(o, _ED_meta) end local function _AddPropertiesForFields(descriptor, message_meta) for _, field in ipairs(descriptor.fields) do _AddPropertiesForField(field, message_meta) end if descriptor.is_extendable then message_meta._getter.Extensions = function(self) return _ExtensionDict(self) end end end local function _AddPropertiesForExtensions(descriptor, message_meta) local extension_dict = descriptor._extensions_by_name for extension_name, extension_field in pairs(extension_dict) do local constant_name = string.upper(extension_name) .. "_FIELD_NUMBER" message_meta._member[constant_name] = extension_field.number end end local function _AddStaticMethods(message_meta) message_meta._member.RegisterExtension = function(extension_handle) extension_handle.containing_type = message_meta._descriptor _AttachFieldHelpers(message_meta, extension_handle) if message_meta._extensions_by_number[extension_handle.number] == nil then message_meta._extensions_by_number[extension_handle.number] = extension_handle else error( string.format('Extensions "%s" and "%s" both try to extend message type "%s" with field number %d.', extension_handle.full_name, actual_handle.full_name, message_meta._descriptor.full_name, extension_handle.number)) end message_meta._extensions_by_name[extension_handle.full_name] = extension_handle end message_meta._member.FromString = function(s) local message = message_meta._member.__call() message.MergeFromString(s) return message end end local function _IsPresent(descriptor, value) if descriptor.label == FieldDescriptor.LABEL_REPEATED then return value elseif descriptor.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE then return value._is_present_in_parent else return true end end local function _AddListFieldsMethod(message_descriptor, message_meta) message_meta._member.ListFields = function (self) local list_field = function(fields) local f, s, v = pairs(self._fields) local iter = function(a, i) while true do local descriptor, value = f(a, i) if descriptor == nil then return elseif _IsPresent(descriptor, value) then return descriptor, value end end end return iter, s, v end return list_field(self._fields) end end local function _AddHasFieldMethod(message_descriptor, message_meta) local singular_fields = {} for _, field in ipairs(message_descriptor.fields) do if field.label ~= FieldDescriptor.LABEL_REPEATED then singular_fields[field.name] = field end end message_meta._member.HasField = function (self, field_name) field = singular_fields[field_name] if field == nil then error('Protocol message has no singular "'.. field_name.. '" field.') end if field.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE then value = self._fields[field] return value ~= nil and value._is_present_in_parent else return self._fields[field] end end end local function _AddClearFieldMethod(message_descriptor, message_meta) message_meta._member.ClearField = function(self, field_name) if message_descriptor.fields_by_name[field_name] == nil then error('Protocol message has no "' .. field_name .. '" field.') end if self._fields[field] then self._fields[field] = nil end message_meta._member._Modified(self) end end local function _AddClearExtensionMethod(message_meta) message_meta._member.ClearExtension = function(self, extension_handle) if self._fields[extension_handle] == nil then self._fields[extension_handle] = nil end message_meta._member._Modified(self) end end local function _AddClearMethod(message_descriptor, message_meta) message_meta._member.Clear = function(self) self._fields = {} message_meta._member._Modified(self) end end local function _AddStrMethod(message_meta) local format = text_format.msg_format message_meta.__tostring = function(self) return format(self) end end local function _AddHasExtensionMethod(message_meta) message_meta._member.HasExtension = function(self, extension_handle) if extension_handle.label == FieldDescriptor.LABEL_REPEATED then error(extension_handle.full_name .. ' is repeated.') end if extension_handle.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE then value = self._fields[extension_handle] return value ~= nil and value._is_present_in_parent else return self._fields[extension_handle] end end end local function _AddSetListenerMethod(message_meta) message_meta._member._SetListener = function(self, listener) if listener ~= nil then self._listener = listener_mod.NullMessageListener() else self._listener = listener end end end local function _AddByteSizeMethod(message_descriptor, message_meta) message_meta._member.ByteSize = function(self) if not self._cached_byte_size_dirty then return self._cached_byte_size end local size = 0 for field_descriptor, field_value in message_meta._member.ListFields(self) do size = field_descriptor._sizer(field_value) + size end self._cached_byte_size = size self._cached_byte_size_dirty = false self._listener_for_children.dirty = false return size end end local function _AddSerializeToStringMethod(message_descriptor, message_meta) message_meta._member.SerializeToString = function(self) if not message_meta._member.IsInitialized(self) then error('Message is missing required fields: ' .. table.concat(message_meta._member.FindInitializationErrors(self), ',')) end return message_meta._member.SerializePartialToString(self) end message_meta._member.SerializeToIOString = function(self, iostring) if not message_meta._member.IsInitialized(self) then error('Message is missing required fields: ' .. table.concat(message_meta._member.FindInitializationErrors(self), ',')) end return message_meta._member.SerializePartialToIOString(self, iostring) end end local function _AddSerializePartialToStringMethod(message_descriptor, message_meta) local concat = table.concat local _internal_serialize = function(self, write_bytes) for field_descriptor, field_value in message_meta._member.ListFields(self) do field_descriptor._encoder(write_bytes, field_value) end end local _serialize_partial_to_iostring = function(self, iostring) local w = iostring.write local write = function(value) w(iostring, value) end _internal_serialize(self, write) return end local _serialize_partial_to_string = function(self) local out = {} local write = function(value) out[#out + 1] = value end _internal_serialize(self, write) return concat(out) end message_meta._member._InternalSerialize = _internal_serialize message_meta._member.SerializePartialToIOString = _serialize_partial_to_iostring message_meta._member.SerializePartialToString = _serialize_partial_to_string end local function _AddMergeFromStringMethod(message_descriptor, message_meta) local ReadTag = decoder.ReadTag local SkipField = decoder.SkipField local decoders_by_tag = message_meta._decoders_by_tag local _internal_parse = function(self, buffer, pos, pend) message_meta._member._Modified(self) local field_dict = self._fields local tag_bytes, new_pos local field_decoder while pos ~= pend do tag_bytes, new_pos = ReadTag(buffer, pos) field_decoder = decoders_by_tag[tag_bytes] if field_decoder == nil then new_pos = SkipField(buffer, new_pos, pend, tag_bytes) if new_pos == -1 then return pos end pos = new_pos else pos = field_decoder(buffer, new_pos, pend, self, field_dict) end end return pos end message_meta._member._InternalParse = _internal_parse local merge_from_string = function(self, serialized) local length = #serialized if _internal_parse(self, serialized, 0, length) ~= length then error('Unexpected end-group tag.') end return length end message_meta._member.MergeFromString = merge_from_string message_meta._member.ParseFromString = function(self, serialized) message_meta._member.Clear(self) merge_from_string(self, serialized) end end local function _AddIsInitializedMethod(message_descriptor, message_meta) local required_fields = {} for _, field in ipairs(message_descriptor.fields) do if field.label == FieldDescriptor.LABEL_REQUIRED then required_fields[#required_fields + 1] = field end end message_meta._member.IsInitialized = function(self, errors) for _, field in ipairs(required_fields) do if self._fields[field] == nil or (field.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE and not self._fields[field]._is_present_in_parent) then if errors ~= nil then errors[#errors + 1] = message_meta._member.FindInitializationErrors(self) end return false end end for field, value in pairs(self._fields) do if field.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE then if field.label == FieldDescriptor.LABEL_REPEATED then for _, element in ipairs(value) do if not element:IsInitialized() then if errors ~= nil then errors[#errors + 1] = message_meta._member.FindInitializationErrors(self) end return false end end elseif value._is_present_in_parent and not value:IsInitialized() then if errors ~= nil then errors[#errors + 1] = message_meta._member.FindInitializationErrors(self) end return false end end end return true end message_meta._member.FindInitializationErrors = function(self) local errors = {} for _,field in ipairs(required_fields) do if not message_meta._member.HasField(self, field.name) then errors.append(field.name) end end for field, value in message_meta._member.ListFields(self) do if field.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE then if field.is_extension then name = io:format("(%s)", field.full_name) else name = field.name end if field.label == FieldDescriptor.LABEL_REPEATED then for i, element in ipairs(value) do prefix = io:format("%s[%d].", name, i) sub_errors = element:FindInitializationErrors() for _, e in ipairs(sub_errors) do errors[#errors + 1] = prefix .. e end end else prefix = name .. "." sub_errors = value:FindInitializationErrors() for _, e in ipairs(sub_errors) do errors[#errors + 1] = prefix .. e end end end end return errors end end local function _AddMergeFromMethod(message_meta) local LABEL_REPEATED = FieldDescriptor.LABEL_REPEATED local CPPTYPE_MESSAGE = FieldDescriptor.CPPTYPE_MESSAGE message_meta._member.MergeFrom = function (self, msg) assert(msg ~= self) message_meta._member._Modified(self) local fields = self._fields for field, value in pairs(msg._fields) do if field.label == LABEL_REPEATED or field.cpp_type == CPPTYPE_MESSAGE then field_value = fields[field] if field_value == nil then field_value = field._default_constructor(self) fields[field] = field_value end field_value:MergeFrom(value) else self._fields[field] = value end end end end local function _AddMessageMethods(message_descriptor, message_meta) _AddListFieldsMethod(message_descriptor, message_meta) _AddHasFieldMethod(message_descriptor, message_meta) _AddClearFieldMethod(message_descriptor, message_meta) if message_descriptor.is_extendable then _AddClearExtensionMethod(message_meta) _AddHasExtensionMethod(message_meta) end _AddClearMethod(message_descriptor, message_meta) -- _AddEqualsMethod(message_descriptor, message_meta) _AddStrMethod(message_meta) _AddSetListenerMethod(message_meta) _AddByteSizeMethod(message_descriptor, message_meta) _AddSerializeToStringMethod(message_descriptor, message_meta) _AddSerializePartialToStringMethod(message_descriptor, message_meta) _AddMergeFromStringMethod(message_descriptor, message_meta) _AddIsInitializedMethod(message_descriptor, message_meta) _AddMergeFromMethod(message_meta) end local function _AddPrivateHelperMethods(message_meta) local Modified = function (self) if not self._cached_byte_size_dirty then self._cached_byte_size_dirty = true self._listener_for_children.dirty = true self._is_present_in_parent = true self._listener:Modified() end end message_meta._member._Modified = Modified message_meta._member.SetInParent = Modified end local function property_getter(message_meta) local getter = message_meta._getter local member = message_meta._member return function (self, property) local g = getter[property] if g then return g(self) else return member[property] end end end local function property_setter(message_meta) local setter = message_meta._setter return function (self, property, value) local s = setter[property] if s then s(self, value) else error(property .. " not found") end end end function _AddClassAttributesForNestedExtensions(descriptor, message_meta) local extension_dict = descriptor._extensions_by_name for extension_name, extension_field in pairs(extension_dict) do message_meta._member[extension_name] = extension_field end end local function Message(descriptor) local message_meta = {} message_meta._decoders_by_tag = {} rawset(descriptor, "_extensions_by_name", {}) for _, k in ipairs(descriptor.extensions) do descriptor._extensions_by_name[k.name] = k end rawset(descriptor, "_extensions_by_number", {}) for _, k in ipairs(descriptor.extensions) do descriptor._extensions_by_number[k.number] = k end message_meta._descriptor = descriptor message_meta._extensions_by_name = {} message_meta._extensions_by_number = {} message_meta._getter = {} message_meta._setter = {} message_meta._member = {} -- message_meta._name = descriptor.full_name local ns = setmetatable({}, message_meta._member) message_meta._member.__call = _InitMethod(message_meta) message_meta._member.__index = message_meta._member message_meta._member.type = ns if rawget(descriptor, "_concrete_class") == nil then rawset(descriptor, "_concrete_class", ns) for k, field in ipairs(descriptor.fields) do _AttachFieldHelpers(message_meta, field) end end _AddEnumValues(descriptor, message_meta) _AddClassAttributesForNestedExtensions(descriptor, message_meta) _AddPropertiesForFields(descriptor, message_meta) _AddPropertiesForExtensions(descriptor, message_meta) _AddStaticMethods(message_meta) _AddMessageMethods(descriptor, message_meta) _AddPrivateHelperMethods(message_meta) message_meta.__index = property_getter(message_meta) message_meta.__newindex = property_setter(message_meta) return ns end _M.Message = Message PK;½N]ò‰{Œììlualib/containers.luanu„[µü¤-- -------------------------------------------------------------------------------- -- FILE: containers.lua -- DESCRIPTION: protoc-gen-lua -- Google's Protocol Buffers project, ported to lua. -- https://code.google.com/p/protoc-gen-lua/ -- -- Copyright (c) 2010 , æž—å�“毅 (Zhuoyi Lin) netsnail@gmail.com -- All rights reserved. -- -- Use, modification and distribution are subject to the "New BSD License" -- as listed at . -- -- COMPANY: NetEase -- CREATED: 2010å¹´08月02æ—¥ 16æ—¶15分42ç§’ CST -------------------------------------------------------------------------------- -- local setmetatable = setmetatable local table = table local rawset = rawset local error = error module "containers" local _RCFC_meta = { add = function(self) local value = self._message_descriptor._concrete_class() local listener = self._listener rawset(self, #self + 1, value) value:_SetListener(listener) if listener.dirty == false then listener:Modified() end return value end, remove = function(self, key) local listener = self._listener table.remove(self, key) listener:Modified() end, __newindex = function(self, key, value) error("RepeatedCompositeFieldContainer Can't set value directly") end } _RCFC_meta.__index = _RCFC_meta function RepeatedCompositeFieldContainer(listener, message_descriptor) local o = { _listener = listener, _message_descriptor = message_descriptor } return setmetatable(o, _RCFC_meta) end local _RSFC_meta = { append = function(self, value) self._type_checker(value) rawset(self, #self + 1, value) self._listener:Modified() end, remove = function(self, key) table.remove(self, key) self._listener:Modified() end, __newindex = function(self, key, value) error("RepeatedCompositeFieldContainer Can't set value directly") end } _RSFC_meta.__index = _RSFC_meta function RepeatedScalarFieldContainer(listener, type_checker) local o = {} o._listener = listener o._type_checker = type_checker return setmetatable(o, _RSFC_meta) end PK;½N]\¶™"H"Hlualib/ws_message_pb.luanu„[µü¤-- Generated By protoc-gen-lua Do not Edit local protobuf = require "protobuf" module('ws_message_pb') local WEBSHIELDDATA = protobuf.Descriptor(); local WEBSHIELDDATA_CAPTCHA = protobuf.EnumDescriptor(); local WEBSHIELDDATA_CAPTCHA_NA_ENUM = protobuf.EnumValueDescriptor(); local WEBSHIELDDATA_CAPTCHA_REQUESTED_ENUM = protobuf.EnumValueDescriptor(); local WEBSHIELDDATA_CAPTCHA_PASSED_ENUM = protobuf.EnumValueDescriptor(); local WEBSHIELDDATA_CAPTCHA_FAILED_ENUM = protobuf.EnumValueDescriptor(); local WEBSHIELDDATA_USER_ID_FIELD = protobuf.FieldDescriptor(); local WEBSHIELDDATA_REQUEST_DATA_FIELD = protobuf.FieldDescriptor(); local WEBSHIELDDATA_MODSEC_DATA_FIELD = protobuf.FieldDescriptor(); local WEBSHIELDDATA_CAPTCHA_FIELD = protobuf.FieldDescriptor(); local REQUESTDATA = protobuf.Descriptor(); local REQUESTDATA_HEADER_FIELD = protobuf.FieldDescriptor(); local REQUESTDATA_METHOD_FIELD = protobuf.FieldDescriptor(); local REQUESTDATA_URI_FIELD = protobuf.FieldDescriptor(); local HEADERITEM = protobuf.Descriptor(); local HEADERITEM_NAME_FIELD = protobuf.FieldDescriptor(); local HEADERITEM_VALUE_FIELD = protobuf.FieldDescriptor(); local MODSECURITYDATA = protobuf.Descriptor(); local MODSECURITYDATA_ACCESS_DENIED_FIELD = protobuf.FieldDescriptor(); local MODSECURITYDATA_OPT_FIELD = protobuf.FieldDescriptor(); local MODSECURITYDATA_TAGS_FIELD = protobuf.FieldDescriptor(); local MODSECURITYOPTION = protobuf.Descriptor(); local MODSECURITYOPTION_NAME_FIELD = protobuf.FieldDescriptor(); local MODSECURITYOPTION_VALUE_FIELD = protobuf.FieldDescriptor(); local PROACTIVEQUEUE = protobuf.Descriptor(); local PROACTIVEQUEUE_ACTION = protobuf.EnumDescriptor(); local PROACTIVEQUEUE_ACTION_LOG_ENUM = protobuf.EnumValueDescriptor(); local PROACTIVEQUEUE_ACTION_KILL_ENUM = protobuf.EnumValueDescriptor(); local PROACTIVEQUEUE_ACTION_BLOCK_ENUM = protobuf.EnumValueDescriptor(); local PROACTIVEQUEUE_VERSION_FIELD = protobuf.FieldDescriptor(); local PROACTIVEQUEUE_RECOGNIZER_ID_FIELD = protobuf.FieldDescriptor(); local PROACTIVEQUEUE_RECOGNIZER_SUB_ID_FIELD = protobuf.FieldDescriptor(); local PROACTIVEQUEUE_ACTION_FIELD = protobuf.FieldDescriptor(); local PROACTIVEQUEUE_QUEUE_FIELD = protobuf.FieldDescriptor(); local PROACTIVEQUEUE_ENV_FIELD = protobuf.FieldDescriptor(); local SENDINFO = protobuf.Descriptor(); local SENDINFO_METHOD = protobuf.EnumDescriptor(); local SENDINFO_METHOD_PROACTIVE_ENUM = protobuf.EnumValueDescriptor(); local SENDINFO_METHOD_WEBSHIELD_ENUM = protobuf.EnumValueDescriptor(); local SENDINFO_METHOD_PAM_ENUM = protobuf.EnumValueDescriptor(); local SENDINFO_METHOD_FIELD = protobuf.FieldDescriptor(); local SENDINFO_IP_FIELD = protobuf.FieldDescriptor(); local SENDINFO_TIMESTAMP_FIELD = protobuf.FieldDescriptor(); local SENDINFO_WEBSH_FIELD = protobuf.FieldDescriptor(); local SENDINFO_PROACTIVE_FIELD = protobuf.FieldDescriptor(); WEBSHIELDDATA_CAPTCHA_NA_ENUM.name = "NA" WEBSHIELDDATA_CAPTCHA_NA_ENUM.index = 0 WEBSHIELDDATA_CAPTCHA_NA_ENUM.number = 0 WEBSHIELDDATA_CAPTCHA_REQUESTED_ENUM.name = "REQUESTED" WEBSHIELDDATA_CAPTCHA_REQUESTED_ENUM.index = 1 WEBSHIELDDATA_CAPTCHA_REQUESTED_ENUM.number = 1 WEBSHIELDDATA_CAPTCHA_PASSED_ENUM.name = "PASSED" WEBSHIELDDATA_CAPTCHA_PASSED_ENUM.index = 2 WEBSHIELDDATA_CAPTCHA_PASSED_ENUM.number = 2 WEBSHIELDDATA_CAPTCHA_FAILED_ENUM.name = "FAILED" WEBSHIELDDATA_CAPTCHA_FAILED_ENUM.index = 3 WEBSHIELDDATA_CAPTCHA_FAILED_ENUM.number = 3 WEBSHIELDDATA_CAPTCHA.name = "Captcha" WEBSHIELDDATA_CAPTCHA.full_name = ".i360parcel.WebShieldData.Captcha" WEBSHIELDDATA_CAPTCHA.values = {WEBSHIELDDATA_CAPTCHA_NA_ENUM,WEBSHIELDDATA_CAPTCHA_REQUESTED_ENUM,WEBSHIELDDATA_CAPTCHA_PASSED_ENUM,WEBSHIELDDATA_CAPTCHA_FAILED_ENUM} WEBSHIELDDATA_USER_ID_FIELD.name = "user_id" WEBSHIELDDATA_USER_ID_FIELD.full_name = ".i360parcel.WebShieldData.user_id" WEBSHIELDDATA_USER_ID_FIELD.number = 1 WEBSHIELDDATA_USER_ID_FIELD.index = 0 WEBSHIELDDATA_USER_ID_FIELD.label = 1 WEBSHIELDDATA_USER_ID_FIELD.has_default_value = true WEBSHIELDDATA_USER_ID_FIELD.default_value = "0000000000000000000000000000000000000000" WEBSHIELDDATA_USER_ID_FIELD.type = 9 WEBSHIELDDATA_USER_ID_FIELD.cpp_type = 9 WEBSHIELDDATA_REQUEST_DATA_FIELD.name = "request_data" WEBSHIELDDATA_REQUEST_DATA_FIELD.full_name = ".i360parcel.WebShieldData.request_data" WEBSHIELDDATA_REQUEST_DATA_FIELD.number = 2 WEBSHIELDDATA_REQUEST_DATA_FIELD.index = 1 WEBSHIELDDATA_REQUEST_DATA_FIELD.label = 1 WEBSHIELDDATA_REQUEST_DATA_FIELD.has_default_value = false WEBSHIELDDATA_REQUEST_DATA_FIELD.default_value = nil WEBSHIELDDATA_REQUEST_DATA_FIELD.message_type = _REQUESTDATA WEBSHIELDDATA_REQUEST_DATA_FIELD.type = 11 WEBSHIELDDATA_REQUEST_DATA_FIELD.cpp_type = 10 WEBSHIELDDATA_MODSEC_DATA_FIELD.name = "modsec_data" WEBSHIELDDATA_MODSEC_DATA_FIELD.full_name = ".i360parcel.WebShieldData.modsec_data" WEBSHIELDDATA_MODSEC_DATA_FIELD.number = 3 WEBSHIELDDATA_MODSEC_DATA_FIELD.index = 2 WEBSHIELDDATA_MODSEC_DATA_FIELD.label = 1 WEBSHIELDDATA_MODSEC_DATA_FIELD.has_default_value = false WEBSHIELDDATA_MODSEC_DATA_FIELD.default_value = nil WEBSHIELDDATA_MODSEC_DATA_FIELD.message_type = _MODSECURITYDATA WEBSHIELDDATA_MODSEC_DATA_FIELD.type = 11 WEBSHIELDDATA_MODSEC_DATA_FIELD.cpp_type = 10 WEBSHIELDDATA_CAPTCHA_FIELD.name = "captcha" WEBSHIELDDATA_CAPTCHA_FIELD.full_name = ".i360parcel.WebShieldData.captcha" WEBSHIELDDATA_CAPTCHA_FIELD.number = 4 WEBSHIELDDATA_CAPTCHA_FIELD.index = 3 WEBSHIELDDATA_CAPTCHA_FIELD.label = 1 WEBSHIELDDATA_CAPTCHA_FIELD.has_default_value = false WEBSHIELDDATA_CAPTCHA_FIELD.default_value = nil WEBSHIELDDATA_CAPTCHA_FIELD.enum_type = WEBSHIELDDATA_CAPTCHA WEBSHIELDDATA_CAPTCHA_FIELD.type = 14 WEBSHIELDDATA_CAPTCHA_FIELD.cpp_type = 8 WEBSHIELDDATA.name = "WebShieldData" WEBSHIELDDATA.full_name = ".i360parcel.WebShieldData" WEBSHIELDDATA.nested_types = {} WEBSHIELDDATA.enum_types = {WEBSHIELDDATA_CAPTCHA} WEBSHIELDDATA.fields = {WEBSHIELDDATA_USER_ID_FIELD, WEBSHIELDDATA_REQUEST_DATA_FIELD, WEBSHIELDDATA_MODSEC_DATA_FIELD, WEBSHIELDDATA_CAPTCHA_FIELD} WEBSHIELDDATA.is_extendable = false WEBSHIELDDATA.extensions = {} REQUESTDATA_HEADER_FIELD.name = "header" REQUESTDATA_HEADER_FIELD.full_name = ".i360parcel.RequestData.header" REQUESTDATA_HEADER_FIELD.number = 1 REQUESTDATA_HEADER_FIELD.index = 0 REQUESTDATA_HEADER_FIELD.label = 3 REQUESTDATA_HEADER_FIELD.has_default_value = false REQUESTDATA_HEADER_FIELD.default_value = {} REQUESTDATA_HEADER_FIELD.message_type = _HEADERITEM REQUESTDATA_HEADER_FIELD.type = 11 REQUESTDATA_HEADER_FIELD.cpp_type = 10 REQUESTDATA_METHOD_FIELD.name = "method" REQUESTDATA_METHOD_FIELD.full_name = ".i360parcel.RequestData.method" REQUESTDATA_METHOD_FIELD.number = 2 REQUESTDATA_METHOD_FIELD.index = 1 REQUESTDATA_METHOD_FIELD.label = 1 REQUESTDATA_METHOD_FIELD.has_default_value = true REQUESTDATA_METHOD_FIELD.default_value = "GET" REQUESTDATA_METHOD_FIELD.type = 9 REQUESTDATA_METHOD_FIELD.cpp_type = 9 REQUESTDATA_URI_FIELD.name = "uri" REQUESTDATA_URI_FIELD.full_name = ".i360parcel.RequestData.uri" REQUESTDATA_URI_FIELD.number = 3 REQUESTDATA_URI_FIELD.index = 2 REQUESTDATA_URI_FIELD.label = 1 REQUESTDATA_URI_FIELD.has_default_value = false REQUESTDATA_URI_FIELD.default_value = "" REQUESTDATA_URI_FIELD.type = 9 REQUESTDATA_URI_FIELD.cpp_type = 9 REQUESTDATA.name = "RequestData" REQUESTDATA.full_name = ".i360parcel.RequestData" REQUESTDATA.nested_types = {} REQUESTDATA.enum_types = {} REQUESTDATA.fields = {REQUESTDATA_HEADER_FIELD, REQUESTDATA_METHOD_FIELD, REQUESTDATA_URI_FIELD} REQUESTDATA.is_extendable = false REQUESTDATA.extensions = {} HEADERITEM_NAME_FIELD.name = "name" HEADERITEM_NAME_FIELD.full_name = ".i360parcel.HeaderItem.name" HEADERITEM_NAME_FIELD.number = 1 HEADERITEM_NAME_FIELD.index = 0 HEADERITEM_NAME_FIELD.label = 2 HEADERITEM_NAME_FIELD.has_default_value = false HEADERITEM_NAME_FIELD.default_value = "" HEADERITEM_NAME_FIELD.type = 9 HEADERITEM_NAME_FIELD.cpp_type = 9 HEADERITEM_VALUE_FIELD.name = "value" HEADERITEM_VALUE_FIELD.full_name = ".i360parcel.HeaderItem.value" HEADERITEM_VALUE_FIELD.number = 2 HEADERITEM_VALUE_FIELD.index = 1 HEADERITEM_VALUE_FIELD.label = 1 HEADERITEM_VALUE_FIELD.has_default_value = false HEADERITEM_VALUE_FIELD.default_value = "" HEADERITEM_VALUE_FIELD.type = 9 HEADERITEM_VALUE_FIELD.cpp_type = 9 HEADERITEM.name = "HeaderItem" HEADERITEM.full_name = ".i360parcel.HeaderItem" HEADERITEM.nested_types = {} HEADERITEM.enum_types = {} HEADERITEM.fields = {HEADERITEM_NAME_FIELD, HEADERITEM_VALUE_FIELD} HEADERITEM.is_extendable = false HEADERITEM.extensions = {} MODSECURITYDATA_ACCESS_DENIED_FIELD.name = "access_denied" MODSECURITYDATA_ACCESS_DENIED_FIELD.full_name = ".i360parcel.ModSecurityData.access_denied" MODSECURITYDATA_ACCESS_DENIED_FIELD.number = 1 MODSECURITYDATA_ACCESS_DENIED_FIELD.index = 0 MODSECURITYDATA_ACCESS_DENIED_FIELD.label = 1 MODSECURITYDATA_ACCESS_DENIED_FIELD.has_default_value = false MODSECURITYDATA_ACCESS_DENIED_FIELD.default_value = false MODSECURITYDATA_ACCESS_DENIED_FIELD.type = 8 MODSECURITYDATA_ACCESS_DENIED_FIELD.cpp_type = 7 MODSECURITYDATA_OPT_FIELD.name = "opt" MODSECURITYDATA_OPT_FIELD.full_name = ".i360parcel.ModSecurityData.opt" MODSECURITYDATA_OPT_FIELD.number = 2 MODSECURITYDATA_OPT_FIELD.index = 1 MODSECURITYDATA_OPT_FIELD.label = 3 MODSECURITYDATA_OPT_FIELD.has_default_value = false MODSECURITYDATA_OPT_FIELD.default_value = {} MODSECURITYDATA_OPT_FIELD.message_type = _MODSECURITYOPTION MODSECURITYDATA_OPT_FIELD.type = 11 MODSECURITYDATA_OPT_FIELD.cpp_type = 10 MODSECURITYDATA_TAGS_FIELD.name = "tags" MODSECURITYDATA_TAGS_FIELD.full_name = ".i360parcel.ModSecurityData.tags" MODSECURITYDATA_TAGS_FIELD.number = 3 MODSECURITYDATA_TAGS_FIELD.index = 2 MODSECURITYDATA_TAGS_FIELD.label = 3 MODSECURITYDATA_TAGS_FIELD.has_default_value = false MODSECURITYDATA_TAGS_FIELD.default_value = {} MODSECURITYDATA_TAGS_FIELD.type = 9 MODSECURITYDATA_TAGS_FIELD.cpp_type = 9 MODSECURITYDATA.name = "ModSecurityData" MODSECURITYDATA.full_name = ".i360parcel.ModSecurityData" MODSECURITYDATA.nested_types = {} MODSECURITYDATA.enum_types = {} MODSECURITYDATA.fields = {MODSECURITYDATA_ACCESS_DENIED_FIELD, MODSECURITYDATA_OPT_FIELD, MODSECURITYDATA_TAGS_FIELD} MODSECURITYDATA.is_extendable = false MODSECURITYDATA.extensions = {} MODSECURITYOPTION_NAME_FIELD.name = "name" MODSECURITYOPTION_NAME_FIELD.full_name = ".i360parcel.ModSecurityOption.name" MODSECURITYOPTION_NAME_FIELD.number = 1 MODSECURITYOPTION_NAME_FIELD.index = 0 MODSECURITYOPTION_NAME_FIELD.label = 2 MODSECURITYOPTION_NAME_FIELD.has_default_value = false MODSECURITYOPTION_NAME_FIELD.default_value = "" MODSECURITYOPTION_NAME_FIELD.type = 9 MODSECURITYOPTION_NAME_FIELD.cpp_type = 9 MODSECURITYOPTION_VALUE_FIELD.name = "value" MODSECURITYOPTION_VALUE_FIELD.full_name = ".i360parcel.ModSecurityOption.value" MODSECURITYOPTION_VALUE_FIELD.number = 2 MODSECURITYOPTION_VALUE_FIELD.index = 1 MODSECURITYOPTION_VALUE_FIELD.label = 1 MODSECURITYOPTION_VALUE_FIELD.has_default_value = false MODSECURITYOPTION_VALUE_FIELD.default_value = "" MODSECURITYOPTION_VALUE_FIELD.type = 9 MODSECURITYOPTION_VALUE_FIELD.cpp_type = 9 MODSECURITYOPTION.name = "ModSecurityOption" MODSECURITYOPTION.full_name = ".i360parcel.ModSecurityOption" MODSECURITYOPTION.nested_types = {} MODSECURITYOPTION.enum_types = {} MODSECURITYOPTION.fields = {MODSECURITYOPTION_NAME_FIELD, MODSECURITYOPTION_VALUE_FIELD} MODSECURITYOPTION.is_extendable = false MODSECURITYOPTION.extensions = {} PROACTIVEQUEUE_ACTION_LOG_ENUM.name = "LOG" PROACTIVEQUEUE_ACTION_LOG_ENUM.index = 0 PROACTIVEQUEUE_ACTION_LOG_ENUM.number = 0 PROACTIVEQUEUE_ACTION_KILL_ENUM.name = "KILL" PROACTIVEQUEUE_ACTION_KILL_ENUM.index = 1 PROACTIVEQUEUE_ACTION_KILL_ENUM.number = 1 PROACTIVEQUEUE_ACTION_BLOCK_ENUM.name = "BLOCK" PROACTIVEQUEUE_ACTION_BLOCK_ENUM.index = 2 PROACTIVEQUEUE_ACTION_BLOCK_ENUM.number = 2 PROACTIVEQUEUE_ACTION.name = "Action" PROACTIVEQUEUE_ACTION.full_name = ".i360parcel.ProactiveQueue.Action" PROACTIVEQUEUE_ACTION.values = {PROACTIVEQUEUE_ACTION_LOG_ENUM,PROACTIVEQUEUE_ACTION_KILL_ENUM,PROACTIVEQUEUE_ACTION_BLOCK_ENUM} PROACTIVEQUEUE_VERSION_FIELD.name = "version" PROACTIVEQUEUE_VERSION_FIELD.full_name = ".i360parcel.ProactiveQueue.version" PROACTIVEQUEUE_VERSION_FIELD.number = 1 PROACTIVEQUEUE_VERSION_FIELD.index = 0 PROACTIVEQUEUE_VERSION_FIELD.label = 2 PROACTIVEQUEUE_VERSION_FIELD.has_default_value = true PROACTIVEQUEUE_VERSION_FIELD.default_value = 1 PROACTIVEQUEUE_VERSION_FIELD.type = 13 PROACTIVEQUEUE_VERSION_FIELD.cpp_type = 3 PROACTIVEQUEUE_RECOGNIZER_ID_FIELD.name = "recognizer_id" PROACTIVEQUEUE_RECOGNIZER_ID_FIELD.full_name = ".i360parcel.ProactiveQueue.recognizer_id" PROACTIVEQUEUE_RECOGNIZER_ID_FIELD.number = 2 PROACTIVEQUEUE_RECOGNIZER_ID_FIELD.index = 1 PROACTIVEQUEUE_RECOGNIZER_ID_FIELD.label = 2 PROACTIVEQUEUE_RECOGNIZER_ID_FIELD.has_default_value = false PROACTIVEQUEUE_RECOGNIZER_ID_FIELD.default_value = 0 PROACTIVEQUEUE_RECOGNIZER_ID_FIELD.type = 13 PROACTIVEQUEUE_RECOGNIZER_ID_FIELD.cpp_type = 3 PROACTIVEQUEUE_RECOGNIZER_SUB_ID_FIELD.name = "recognizer_sub_id" PROACTIVEQUEUE_RECOGNIZER_SUB_ID_FIELD.full_name = ".i360parcel.ProactiveQueue.recognizer_sub_id" PROACTIVEQUEUE_RECOGNIZER_SUB_ID_FIELD.number = 30 PROACTIVEQUEUE_RECOGNIZER_SUB_ID_FIELD.index = 2 PROACTIVEQUEUE_RECOGNIZER_SUB_ID_FIELD.label = 1 PROACTIVEQUEUE_RECOGNIZER_SUB_ID_FIELD.has_default_value = false PROACTIVEQUEUE_RECOGNIZER_SUB_ID_FIELD.default_value = 0 PROACTIVEQUEUE_RECOGNIZER_SUB_ID_FIELD.type = 13 PROACTIVEQUEUE_RECOGNIZER_SUB_ID_FIELD.cpp_type = 3 PROACTIVEQUEUE_ACTION_FIELD.name = "action" PROACTIVEQUEUE_ACTION_FIELD.full_name = ".i360parcel.ProactiveQueue.action" PROACTIVEQUEUE_ACTION_FIELD.number = 31 PROACTIVEQUEUE_ACTION_FIELD.index = 3 PROACTIVEQUEUE_ACTION_FIELD.label = 1 PROACTIVEQUEUE_ACTION_FIELD.has_default_value = false PROACTIVEQUEUE_ACTION_FIELD.default_value = nil PROACTIVEQUEUE_ACTION_FIELD.enum_type = PROACTIVEQUEUE_ACTION PROACTIVEQUEUE_ACTION_FIELD.type = 14 PROACTIVEQUEUE_ACTION_FIELD.cpp_type = 8 PROACTIVEQUEUE_QUEUE_FIELD.name = "queue" PROACTIVEQUEUE_QUEUE_FIELD.full_name = ".i360parcel.ProactiveQueue.queue" PROACTIVEQUEUE_QUEUE_FIELD.number = 4 PROACTIVEQUEUE_QUEUE_FIELD.index = 4 PROACTIVEQUEUE_QUEUE_FIELD.label = 3 PROACTIVEQUEUE_QUEUE_FIELD.has_default_value = false PROACTIVEQUEUE_QUEUE_FIELD.default_value = {} PROACTIVEQUEUE_QUEUE_FIELD.type = 7 PROACTIVEQUEUE_QUEUE_FIELD.cpp_type = 3 PROACTIVEQUEUE_ENV_FIELD.name = "env" PROACTIVEQUEUE_ENV_FIELD.full_name = ".i360parcel.ProactiveQueue.env" PROACTIVEQUEUE_ENV_FIELD.number = 5 PROACTIVEQUEUE_ENV_FIELD.index = 5 PROACTIVEQUEUE_ENV_FIELD.label = 3 PROACTIVEQUEUE_ENV_FIELD.has_default_value = false PROACTIVEQUEUE_ENV_FIELD.default_value = {} PROACTIVEQUEUE_ENV_FIELD.type = 9 PROACTIVEQUEUE_ENV_FIELD.cpp_type = 9 PROACTIVEQUEUE.name = "ProactiveQueue" PROACTIVEQUEUE.full_name = ".i360parcel.ProactiveQueue" PROACTIVEQUEUE.nested_types = {} PROACTIVEQUEUE.enum_types = {PROACTIVEQUEUE_ACTION} PROACTIVEQUEUE.fields = {PROACTIVEQUEUE_VERSION_FIELD, PROACTIVEQUEUE_RECOGNIZER_ID_FIELD, PROACTIVEQUEUE_RECOGNIZER_SUB_ID_FIELD, PROACTIVEQUEUE_ACTION_FIELD, PROACTIVEQUEUE_QUEUE_FIELD, PROACTIVEQUEUE_ENV_FIELD} PROACTIVEQUEUE.is_extendable = false PROACTIVEQUEUE.extensions = {} SENDINFO_METHOD_PROACTIVE_ENUM.name = "PROACTIVE" SENDINFO_METHOD_PROACTIVE_ENUM.index = 0 SENDINFO_METHOD_PROACTIVE_ENUM.number = 0 SENDINFO_METHOD_WEBSHIELD_ENUM.name = "WEBSHIELD" SENDINFO_METHOD_WEBSHIELD_ENUM.index = 1 SENDINFO_METHOD_WEBSHIELD_ENUM.number = 1 SENDINFO_METHOD_PAM_ENUM.name = "PAM" SENDINFO_METHOD_PAM_ENUM.index = 2 SENDINFO_METHOD_PAM_ENUM.number = 2 SENDINFO_METHOD.name = "Method" SENDINFO_METHOD.full_name = ".i360parcel.SendInfo.Method" SENDINFO_METHOD.values = {SENDINFO_METHOD_PROACTIVE_ENUM,SENDINFO_METHOD_WEBSHIELD_ENUM,SENDINFO_METHOD_PAM_ENUM} SENDINFO_METHOD_FIELD.name = "method" SENDINFO_METHOD_FIELD.full_name = ".i360parcel.SendInfo.method" SENDINFO_METHOD_FIELD.number = 1 SENDINFO_METHOD_FIELD.index = 0 SENDINFO_METHOD_FIELD.label = 2 SENDINFO_METHOD_FIELD.has_default_value = false SENDINFO_METHOD_FIELD.default_value = nil SENDINFO_METHOD_FIELD.enum_type = SENDINFO_METHOD SENDINFO_METHOD_FIELD.type = 14 SENDINFO_METHOD_FIELD.cpp_type = 8 SENDINFO_IP_FIELD.name = "ip" SENDINFO_IP_FIELD.full_name = ".i360parcel.SendInfo.ip" SENDINFO_IP_FIELD.number = 2 SENDINFO_IP_FIELD.index = 1 SENDINFO_IP_FIELD.label = 2 SENDINFO_IP_FIELD.has_default_value = false SENDINFO_IP_FIELD.default_value = "" SENDINFO_IP_FIELD.type = 9 SENDINFO_IP_FIELD.cpp_type = 9 SENDINFO_TIMESTAMP_FIELD.name = "timestamp" SENDINFO_TIMESTAMP_FIELD.full_name = ".i360parcel.SendInfo.timestamp" SENDINFO_TIMESTAMP_FIELD.number = 4 SENDINFO_TIMESTAMP_FIELD.index = 2 SENDINFO_TIMESTAMP_FIELD.label = 2 SENDINFO_TIMESTAMP_FIELD.has_default_value = false SENDINFO_TIMESTAMP_FIELD.default_value = 0 SENDINFO_TIMESTAMP_FIELD.type = 5 SENDINFO_TIMESTAMP_FIELD.cpp_type = 1 SENDINFO_WEBSH_FIELD.name = "websh" SENDINFO_WEBSH_FIELD.full_name = ".i360parcel.SendInfo.websh" SENDINFO_WEBSH_FIELD.number = 5 SENDINFO_WEBSH_FIELD.index = 3 SENDINFO_WEBSH_FIELD.label = 1 SENDINFO_WEBSH_FIELD.has_default_value = false SENDINFO_WEBSH_FIELD.default_value = nil SENDINFO_WEBSH_FIELD.message_type = WEBSHIELDDATA SENDINFO_WEBSH_FIELD.type = 11 SENDINFO_WEBSH_FIELD.cpp_type = 10 SENDINFO_PROACTIVE_FIELD.name = "proactive" SENDINFO_PROACTIVE_FIELD.full_name = ".i360parcel.SendInfo.proactive" SENDINFO_PROACTIVE_FIELD.number = 6 SENDINFO_PROACTIVE_FIELD.index = 4 SENDINFO_PROACTIVE_FIELD.label = 1 SENDINFO_PROACTIVE_FIELD.has_default_value = false SENDINFO_PROACTIVE_FIELD.default_value = nil SENDINFO_PROACTIVE_FIELD.message_type = PROACTIVEQUEUE SENDINFO_PROACTIVE_FIELD.type = 11 SENDINFO_PROACTIVE_FIELD.cpp_type = 10 SENDINFO.name = "SendInfo" SENDINFO.full_name = ".i360parcel.SendInfo" SENDINFO.nested_types = {} SENDINFO.enum_types = {SENDINFO_METHOD} SENDINFO.fields = {SENDINFO_METHOD_FIELD, SENDINFO_IP_FIELD, SENDINFO_TIMESTAMP_FIELD, SENDINFO_WEBSH_FIELD, SENDINFO_PROACTIVE_FIELD} SENDINFO.is_extendable = false SENDINFO.extensions = {} HeaderItem = protobuf.Message(HEADERITEM) ModSecurityData = protobuf.Message(MODSECURITYDATA) ModSecurityOption = protobuf.Message(MODSECURITYOPTION) ProactiveQueue = protobuf.Message(PROACTIVEQUEUE) RequestData = protobuf.Message(REQUESTDATA) SendInfo = protobuf.Message(SENDINFO) WebShieldData = protobuf.Message(WEBSHIELDDATA) PK;½N] 0(y„„lualib/descriptor.luanu„[µü¤-- -------------------------------------------------------------------------------- -- FILE: descriptor.lua -- DESCRIPTION: protoc-gen-lua -- Google's Protocol Buffers project, ported to lua. -- https://code.google.com/p/protoc-gen-lua/ -- -- Copyright (c) 2010 , æž—å�“毅 (Zhuoyi Lin) netsnail@gmail.com -- All rights reserved. -- -- Use, modification and distribution are subject to the "New BSD License" -- as listed at . -- -- COMPANY: NetEase -- CREATED: 2010å¹´08月11æ—¥ 18æ—¶45分43ç§’ CST -------------------------------------------------------------------------------- -- module "descriptor" FieldDescriptor = { TYPE_DOUBLE = 1, TYPE_FLOAT = 2, TYPE_INT64 = 3, TYPE_UINT64 = 4, TYPE_INT32 = 5, TYPE_FIXED64 = 6, TYPE_FIXED32 = 7, TYPE_BOOL = 8, TYPE_STRING = 9, TYPE_GROUP = 10, TYPE_MESSAGE = 11, TYPE_BYTES = 12, TYPE_UINT32 = 13, TYPE_ENUM = 14, TYPE_SFIXED32 = 15, TYPE_SFIXED64 = 16, TYPE_SINT32 = 17, TYPE_SINT64 = 18, MAX_TYPE = 18, -- Must be consistent with C++ FieldDescriptor::CppType enum in -- descriptor.h. -- CPPTYPE_INT32 = 1, CPPTYPE_INT64 = 2, CPPTYPE_UINT32 = 3, CPPTYPE_UINT64 = 4, CPPTYPE_DOUBLE = 5, CPPTYPE_FLOAT = 6, CPPTYPE_BOOL = 7, CPPTYPE_ENUM = 8, CPPTYPE_STRING = 9, CPPTYPE_MESSAGE = 10, MAX_CPPTYPE = 10, -- Must be consistent with C++ FieldDescriptor::Label enum in -- descriptor.h. -- LABEL_OPTIONAL = 1, LABEL_REQUIRED = 2, LABEL_REPEATED = 3, MAX_LABEL = 3 } PK;½N]R!¯$-$-lualib/decoder.luanu„[µü¤-- -------------------------------------------------------------------------------- -- FILE: decoder.lua -- DESCRIPTION: protoc-gen-lua -- Google's Protocol Buffers project, ported to lua. -- https://code.google.com/p/protoc-gen-lua/ -- -- Copyright (c) 2010 , æž—å�“毅 (Zhuoyi Lin) netsnail@gmail.com -- All rights reserved. -- -- Use, modification and distribution are subject to the "New BSD License" -- as listed at . -- -- COMPANY: NetEase -- CREATED: 2010å¹´07月29æ—¥ 19æ—¶30分51ç§’ CST -------------------------------------------------------------------------------- -- local string = string local table = table local assert = assert local ipairs = ipairs local error = error local print = print local pb = require "pb" local encoder = require "encoder" local wire_format = require "wire_format" module "decoder" local _DecodeVarint = pb.varint_decoder local _DecodeSignedVarint = pb.signed_varint_decoder local _DecodeVarint32 = pb.varint_decoder local _DecodeSignedVarint32 = pb.signed_varint_decoder ReadTag = pb.read_tag local function _SimpleDecoder(wire_type, decode_value) return function(field_number, is_repeated, is_packed, key, new_default) if is_packed then local DecodeVarint = _DecodeVarint return function (buffer, pos, pend, message, field_dict) local value = field_dict[key] if value == nil then value = new_default(message) field_dict[key] = value end local endpoint endpoint, pos = DecodeVarint(buffer, pos) endpoint = endpoint + pos if endpoint > pend then error('Truncated message.') end local element while pos < endpoint do element, pos = decode_value(buffer, pos) value[#value + 1] = element end if pos > endpoint then value:remove(#value) error('Packed element was truncated.') end return pos end elseif is_repeated then local tag_bytes = encoder.TagBytes(field_number, wire_type) local tag_len = #tag_bytes local sub = string.sub return function(buffer, pos, pend, message, field_dict) local value = field_dict[key] if value == nil then value = new_default(message) field_dict[key] = value end while 1 do local element, new_pos = decode_value(buffer, pos) value:append(element) pos = new_pos + tag_len if sub(buffer, new_pos+1, pos) ~= tag_bytes or new_pos >= pend then if new_pos > pend then error('Truncated message.') end return new_pos end end end else return function (buffer, pos, pend, message, field_dict) field_dict[key], pos = decode_value(buffer, pos) if pos > pend then field_dict[key] = nil error('Truncated message.') end return pos end end end end local function _ModifiedDecoder(wire_type, decode_value, modify_value) local InnerDecode = function (buffer, pos) local result, new_pos = decode_value(buffer, pos) return modify_value(result), new_pos end return _SimpleDecoder(wire_type, InnerDecode) end local function _StructPackDecoder(wire_type, value_size, format) local struct_unpack = pb.struct_unpack function InnerDecode(buffer, pos) local new_pos = pos + value_size local result = struct_unpack(format, buffer, pos) return result, new_pos end return _SimpleDecoder(wire_type, InnerDecode) end local function _Boolean(value) return value ~= 0 end Int32Decoder = _SimpleDecoder(wire_format.WIRETYPE_VARINT, _DecodeSignedVarint32) EnumDecoder = Int32Decoder Int64Decoder = _SimpleDecoder(wire_format.WIRETYPE_VARINT, _DecodeSignedVarint) UInt32Decoder = _SimpleDecoder(wire_format.WIRETYPE_VARINT, _DecodeVarint32) UInt64Decoder = _SimpleDecoder(wire_format.WIRETYPE_VARINT, _DecodeVarint) SInt32Decoder = _ModifiedDecoder(wire_format.WIRETYPE_VARINT, _DecodeVarint32, wire_format.ZigZagDecode32) SInt64Decoder = _ModifiedDecoder(wire_format.WIRETYPE_VARINT, _DecodeVarint, wire_format.ZigZagDecode64) Fixed32Decoder = _StructPackDecoder(wire_format.WIRETYPE_FIXED32, 4, string.byte('I')) Fixed64Decoder = _StructPackDecoder(wire_format.WIRETYPE_FIXED64, 8, string.byte('Q')) SFixed32Decoder = _StructPackDecoder(wire_format.WIRETYPE_FIXED32, 4, string.byte('i')) SFixed64Decoder = _StructPackDecoder(wire_format.WIRETYPE_FIXED64, 8, string.byte('q')) FloatDecoder = _StructPackDecoder(wire_format.WIRETYPE_FIXED32, 4, string.byte('f')) DoubleDecoder = _StructPackDecoder(wire_format.WIRETYPE_FIXED64, 8, string.byte('d')) BoolDecoder = _ModifiedDecoder(wire_format.WIRETYPE_VARINT, _DecodeVarint, _Boolean) function StringDecoder(field_number, is_repeated, is_packed, key, new_default) local DecodeVarint = _DecodeVarint local sub = string.sub -- local unicode = unicode assert(not is_packed) if is_repeated then local tag_bytes = encoder.TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) local tag_len = #tag_bytes return function (buffer, pos, pend, message, field_dict) local value = field_dict[key] if value == nil then value = new_default(message) field_dict[key] = value end while 1 do local size, new_pos size, pos = DecodeVarint(buffer, pos) new_pos = pos + size if new_pos > pend then error('Truncated string.') end value:append(sub(buffer, pos+1, new_pos)) pos = new_pos + tag_len if sub(buffer, new_pos + 1, pos) ~= tag_bytes or new_pos == pend then return new_pos end end end else return function (buffer, pos, pend, message, field_dict) local size, new_pos size, pos = DecodeVarint(buffer, pos) new_pos = pos + size if new_pos > pend then error('Truncated string.') end field_dict[key] = sub(buffer, pos + 1, new_pos) return new_pos end end end function BytesDecoder(field_number, is_repeated, is_packed, key, new_default) local DecodeVarint = _DecodeVarint local sub = string.sub assert(not is_packed) if is_repeated then local tag_bytes = encoder.TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) local tag_len = #tag_bytes return function (buffer, pos, pend, message, field_dict) local value = field_dict[key] if value == nil then value = new_default(message) field_dict[key] = value end while 1 do local size, new_pos size, pos = DecodeVarint(buffer, pos) new_pos = pos + size if new_pos > pend then error('Truncated string.') end value:append(sub(buffer, pos + 1, new_pos)) pos = new_pos + tag_len if sub(buffer, new_pos + 1, pos) ~= tag_bytes or new_pos == pend then return new_pos end end end else return function(buffer, pos, pend, message, field_dict) local size, new_pos size, pos = DecodeVarint(buffer, pos) new_pos = pos + size if new_pos > pend then error('Truncated string.') end field_dict[key] = sub(buffer, pos + 1, new_pos) return new_pos end end end function MessageDecoder(field_number, is_repeated, is_packed, key, new_default) local DecodeVarint = _DecodeVarint local sub = string.sub assert(not is_packed) if is_repeated then local tag_bytes = encoder.TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) local tag_len = #tag_bytes return function (buffer, pos, pend, message, field_dict) local value = field_dict[key] if value == nil then value = new_default(message) field_dict[key] = value end while 1 do local size, new_pos size, pos = DecodeVarint(buffer, pos) new_pos = pos + size if new_pos > pend then error('Truncated message.') end if value:add():_InternalParse(buffer, pos, new_pos) ~= new_pos then error('Unexpected end-group tag.') end pos = new_pos + tag_len if sub(buffer, new_pos + 1, pos) ~= tag_bytes or new_pos == pend then return new_pos end end end else return function (buffer, pos, pend, message, field_dict) local value = field_dict[key] if value == nil then value = new_default(message) field_dict[key] = value end local size, new_pos size, pos = DecodeVarint(buffer, pos) new_pos = pos + size if new_pos > pend then error('Truncated message.') end if value:_InternalParse(buffer, pos, new_pos) ~= new_pos then error('Unexpected end-group tag.') end return new_pos end end end function _SkipVarint(buffer, pos, pend) local value value, pos = _DecodeVarint(buffer, pos) return pos end function _SkipFixed64(buffer, pos, pend) pos = pos + 8 if pos > pend then error('Truncated message.') end return pos end function _SkipLengthDelimited(buffer, pos, pend) local size size, pos = _DecodeVarint(buffer, pos) pos = pos + size if pos > pend then error('Truncated message.') end return pos end function _SkipFixed32(buffer, pos, pend) pos = pos + 4 if pos > pend then error('Truncated message.') end return pos end function _RaiseInvalidWireType(buffer, pos, pend) error('Tag had invalid wire type.') end function _FieldSkipper() WIRETYPE_TO_SKIPPER = { _SkipVarint, _SkipFixed64, _SkipLengthDelimited, _SkipGroup, _EndGroup, _SkipFixed32, _RaiseInvalidWireType, _RaiseInvalidWireType, } -- wiretype_mask = wire_format.TAG_TYPE_MASK local ord = string.byte local sub = string.sub return function (buffer, pos, pend, tag_bytes) local wire_type = ord(sub(tag_bytes, 1, 1)) % 8 + 1 return WIRETYPE_TO_SKIPPER[wire_type](buffer, pos, pend) end end SkipField = _FieldSkipper() PK;½N]HÈȳ  lualib/listener.luanu„[µü¤-- -------------------------------------------------------------------------------- -- FILE: listener.lua -- DESCRIPTION: protoc-gen-lua -- Google's Protocol Buffers project, ported to lua. -- https://code.google.com/p/protoc-gen-lua/ -- -- Copyright (c) 2010 , æž—å�“毅 (Zhuoyi Lin) netsnail@gmail.com -- All rights reserved. -- -- Use, modification and distribution are subject to the "New BSD License" -- as listed at . -- -- COMPANY: NetEase -- CREATED: 2010å¹´08月02æ—¥ 17æ—¶35分25ç§’ CST -------------------------------------------------------------------------------- -- local setmetatable = setmetatable module "listener" local _null_listener = { Modified = function() end } function NullMessageListener() return _null_listener end local _listener_meta = { Modified = function(self) if self.dirty then return end if self._parent_message then self._parent_message:_Modified() end end } _listener_meta.__index = _listener_meta function Listener(parent_message) local o = {} o.__mode = "v" o._parent_message = parent_message o.dirty = false return setmetatable(o, _listener_meta) end PK;½N]<ØYT®®lualib/wire_format.luanu„[µü¤-- -------------------------------------------------------------------------------- -- FILE: wire_format.lua -- DESCRIPTION: protoc-gen-lua -- Google's Protocol Buffers project, ported to lua. -- https://code.google.com/p/protoc-gen-lua/ -- -- Copyright (c) 2010 , æž—å�“毅 (Zhuoyi Lin) netsnail@gmail.com -- All rights reserved. -- -- Use, modification and distribution are subject to the "New BSD License" -- as listed at . -- COMPANY: NetEase -- CREATED: 2010å¹´07月30æ—¥ 15æ—¶59分53ç§’ CST -------------------------------------------------------------------------------- -- local pb = require "pb" module "wire_format" WIRETYPE_VARINT = 0 WIRETYPE_FIXED64 = 1 WIRETYPE_LENGTH_DELIMITED = 2 WIRETYPE_START_GROUP = 3 WIRETYPE_END_GROUP = 4 WIRETYPE_FIXED32 = 5 _WIRETYPE_MAX = 5 -- yeah, we don't need uint64 local function _VarUInt64ByteSizeNoTag(uint64) if uint64 <= 0x7f then return 1 end if uint64 <= 0x3fff then return 2 end if uint64 <= 0x1fffff then return 3 end if uint64 <= 0xfffffff then return 4 end return 5 end function PackTag(field_number, wire_type) return field_number * 8 + wire_type end function UnpackTag(tag) local wire_type = tag % 8 return (tag - wire_type) / 8, wire_type end ZigZagEncode32 = pb.zig_zag_encode32 ZigZagDecode32 = pb.zig_zag_decode32 ZigZagEncode64 = pb.zig_zag_encode64 ZigZagDecode64 = pb.zig_zag_decode64 function Int32ByteSize(field_number, int32) return Int64ByteSize(field_number, int32) end function Int32ByteSizeNoTag(int32) return _VarUInt64ByteSizeNoTag(int32) end function Int64ByteSize(field_number, int64) return UInt64ByteSize(field_number, int64) end function UInt32ByteSize(field_number, uint32) return UInt64ByteSize(field_number, uint32) end function UInt64ByteSize(field_number, uint64) return TagByteSize(field_number) + _VarUInt64ByteSizeNoTag(uint64) end function SInt32ByteSize(field_number, int32) return UInt32ByteSize(field_number, ZigZagEncode(int32)) end function SInt64ByteSize(field_number, int64) return UInt64ByteSize(field_number, ZigZagEncode(int64)) end function Fixed32ByteSize(field_number, fixed32) return TagByteSize(field_number) + 4 end function Fixed64ByteSize(field_number, fixed64) return TagByteSize(field_number) + 8 end function SFixed32ByteSize(field_number, sfixed32) return TagByteSize(field_number) + 4 end function SFixed64ByteSize(field_number, sfixed64) return TagByteSize(field_number) + 8 end function FloatByteSize(field_number, flt) return TagByteSize(field_number) + 4 end function DoubleByteSize(field_number, double) return TagByteSize(field_number) + 8 end function BoolByteSize(field_number, b) return TagByteSize(field_number) + 1 end function EnumByteSize(field_number, enum) return UInt32ByteSize(field_number, enum) end function StringByteSize(field_number, string) return BytesByteSize(field_number, string) end function BytesByteSize(field_number, b) return TagByteSize(field_number) + _VarUInt64ByteSizeNoTag(#b) + #b end function MessageByteSize(field_number, message) return TagByteSize(field_number) + _VarUInt64ByteSizeNoTag(message.ByteSize()) + message.ByteSize() end function MessageSetItemByteSize(field_number, msg) local total_size = 2 * TagByteSize(1) + TagByteSize(2) + TagByteSize(3) total_size = total_size + _VarUInt64ByteSizeNoTag(field_number) local message_size = msg.ByteSize() total_size = total_size + _VarUInt64ByteSizeNoTag(message_size) total_size = total_size + message_size return total_size end function TagByteSize(field_number) return _VarUInt64ByteSizeNoTag(PackTag(field_number, 0)) end PK;½N]õ)T4 4 lualib/type_checkers.luanu„[µü¤PK;½N]Ò{¬6w:w:| lualib/encoder.luanu„[µü¤PK;½N]WÈÉ0À<À< 5Dlualib/pb.sonuȯÝíPK;½N]CMËJ¤ ¤ 1�lualib/text_format.luanu„[µü¤PK;½N]!®ó7QBQB‹lualib/ipset_message_pb.luanu„[µü¤PK;½N]\ Zñ‰ñ‰·Ílualib/protobuf.luanu„[µü¤PK;½N]ò‰{ŒììëWlualib/containers.luanu„[µü¤PK;½N]\¶™"H"Halualib/ws_message_pb.luanu„[µü¤PK;½N] 0(y„„†©lualib/descriptor.luanu„[µü¤PK;½N]R!¯$-$-O±lualib/decoder.luanu„[µü¤PK;½N]HÈȳ  µÞlualib/listener.luanu„[µü¤PK;½N]<ØYT®®älualib/wire_format.luanu„[µü¤PK ÷öò