mirror of
https://github.com/itdoginfo/allow-domains.git
synced 2026-03-26 00:44:43 +03:00
Ref: add protobuf
This commit is contained in:
0
proto/__init__.py
Normal file
0
proto/__init__.py
Normal file
37
proto/geosite.proto
Normal file
37
proto/geosite.proto
Normal file
@@ -0,0 +1,37 @@
|
||||
// Source: github.com/v2fly/v2ray-core/app/router/routercommon/common.proto
|
||||
syntax = "proto3";
|
||||
|
||||
package geosite;
|
||||
|
||||
option go_package = "geosite";
|
||||
|
||||
message Domain {
|
||||
enum Type {
|
||||
Plain = 0;
|
||||
Regex = 1;
|
||||
RootDomain = 2;
|
||||
Full = 3;
|
||||
}
|
||||
|
||||
Type type = 1;
|
||||
string value = 2;
|
||||
|
||||
message Attribute {
|
||||
string key = 1;
|
||||
oneof typed_value {
|
||||
bool bool_value = 2;
|
||||
int64 int_value = 3;
|
||||
}
|
||||
}
|
||||
|
||||
repeated Attribute attribute = 3;
|
||||
}
|
||||
|
||||
message GeoSite {
|
||||
string country_code = 1;
|
||||
repeated Domain domain = 2;
|
||||
}
|
||||
|
||||
message GeoSiteList {
|
||||
repeated GeoSite entry = 1;
|
||||
}
|
||||
45
proto/geosite_pb2.py
Normal file
45
proto/geosite_pb2.py
Normal file
@@ -0,0 +1,45 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# NO CHECKED-IN PROTOBUF GENCODE
|
||||
# source: proto/geosite.proto
|
||||
# Protobuf Python Version: 6.32.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
from google.protobuf import runtime_version as _runtime_version
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
from google.protobuf.internal import builder as _builder
|
||||
_runtime_version.ValidateProtobufRuntimeVersion(
|
||||
_runtime_version.Domain.PUBLIC,
|
||||
6,
|
||||
32,
|
||||
1,
|
||||
'',
|
||||
'proto/geosite.proto'
|
||||
)
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13proto/geosite.proto\x12\x07geosite\"\xf5\x01\n\x06\x44omain\x12\"\n\x04type\x18\x01 \x01(\x0e\x32\x14.geosite.Domain.Type\x12\r\n\x05value\x18\x02 \x01(\t\x12,\n\tattribute\x18\x03 \x03(\x0b\x32\x19.geosite.Domain.Attribute\x1aR\n\tAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x14\n\nbool_value\x18\x02 \x01(\x08H\x00\x12\x13\n\tint_value\x18\x03 \x01(\x03H\x00\x42\r\n\x0btyped_value\"6\n\x04Type\x12\t\n\x05Plain\x10\x00\x12\t\n\x05Regex\x10\x01\x12\x0e\n\nRootDomain\x10\x02\x12\x08\n\x04\x46ull\x10\x03\"@\n\x07GeoSite\x12\x14\n\x0c\x63ountry_code\x18\x01 \x01(\t\x12\x1f\n\x06\x64omain\x18\x02 \x03(\x0b\x32\x0f.geosite.Domain\".\n\x0bGeoSiteList\x12\x1f\n\x05\x65ntry\x18\x01 \x03(\x0b\x32\x10.geosite.GeoSiteB\tZ\x07geositeb\x06proto3')
|
||||
|
||||
_globals = globals()
|
||||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
||||
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'proto.geosite_pb2', _globals)
|
||||
if not _descriptor._USE_C_DESCRIPTORS:
|
||||
_globals['DESCRIPTOR']._loaded_options = None
|
||||
_globals['DESCRIPTOR']._serialized_options = b'Z\007geosite'
|
||||
_globals['_DOMAIN']._serialized_start=33
|
||||
_globals['_DOMAIN']._serialized_end=278
|
||||
_globals['_DOMAIN_ATTRIBUTE']._serialized_start=140
|
||||
_globals['_DOMAIN_ATTRIBUTE']._serialized_end=222
|
||||
_globals['_DOMAIN_TYPE']._serialized_start=224
|
||||
_globals['_DOMAIN_TYPE']._serialized_end=278
|
||||
_globals['_GEOSITE']._serialized_start=280
|
||||
_globals['_GEOSITE']._serialized_end=344
|
||||
_globals['_GEOSITELIST']._serialized_start=346
|
||||
_globals['_GEOSITELIST']._serialized_end=392
|
||||
# @@protoc_insertion_point(module_scope)
|
||||
Reference in New Issue
Block a user