airborne007 / v2sub Goto Github PK
View Code? Open in Web Editor NEWA v2ray subscriber written in python3
Home Page: https://pypi.org/project/v2sub/
License: MIT License
A v2ray subscriber written in python3
Home Page: https://pypi.org/project/v2sub/
License: MIT License
我发现我这边加了订阅地址之后返回的node并不是标准格式的,所以需要调用老哥的padding_base64才可以正常使用。
也就是在parser_subscribe函数中修改:
#from
node = utils.byte2str(base64.b64decode(node))
#to
node = utils.str2byte(node)
node = utils.byte2str(base64.b64decode(padding_base64(node)))
不知道是不是和我这边的版本有关系
我的python是3.8,别的版本我也不懂怎么看了。。
不知道这是不是普遍存在的问题还是我加的订阅本身不符合规范呀?
Hi,
I try to use this tool, but meet the following error:
1-
$ v2sub add https://raw.githubusercontent.com/eycorsican/rule-sets/master/kitsunebi_sub
Please run as root.
2- When I use ``sudo -i'' swith to root and then run the command again, but still failed as follows:
v2ray/v2sub# .venv/bin/v2sub update
Traceback (most recent call last):
File ".venv/bin/v2sub", line 10, in
sys.exit(cli())
File "/home/werner/software/anti-gfw/v2ray/v2sub/.venv/lib/python3.7/site-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/home/werner/software/anti-gfw/v2ray/v2sub/.venv/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/werner/software/anti-gfw/v2ray/v2sub/.venv/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/werner/software/anti-gfw/v2ray/v2sub/.venv/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/werner/software/anti-gfw/v2ray/v2sub/.venv/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/werner/software/anti-gfw/v2ray/v2sub/.venv/lib/python3.7/site-packages/v2sub/command.py", line 61, in update
subscribe.update_subscribe(name=name, all_subs=all_subs)
File "/home/werner/software/anti-gfw/v2ray/v2sub/.venv/lib/python3.7/site-packages/v2sub/subscribe.py", line 99, in update_subscribe
parser_subscribe(url, name=name)
File "/home/werner/software/anti-gfw/v2ray/v2sub/.venv/lib/python3.7/site-packages/v2sub/subscribe.py", line 77, in parser_subscribe
node = utils.byte2str(base64.b64decode(node))
File "/home/werner/software/anti-gfw/v2ray/v2sub/.venv/lib/python3.7/site-packages/v2sub/utils.py", line 30, in byte2str
return byte.decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9d in position 78: invalid start byte
Any hints to solve these issues?
exception below shows when use v2sub run. other commands are ok
switch to node:
[node]
Traceback (most recent call last):
File "/data/conda3/bin/v2sub", line 8, in <module>
sys.exit(cli())
File "/data/conda3/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/data/conda3/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/data/conda3/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/data/conda3/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/data/conda3/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/data/conda3/lib/python3.10/site-packages/v2sub/command.py", line 97, in run
existing_unit = utils.read_from_json(systemd.SYSTEMD_UNIT).get("unit", "")
NameError: name 'systemd' is not defined
no idea where this error come from. check systemd.py and it exists in site-packages/v2sub
path as supposed
version info:
centOS 8
python 3.10.9
v2ray 5.3
v2sub 1.3 install through pip
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.