weiss

package module
v0.0.0-...-2a3d2d4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

README

weiss

一个go lib,允许通过本地proxy的方式直连pixiv

实现

Android端实现:Pixez
IOS端实现:存在信任证书问题
Windows&mac:已验证可行

compile

如果是go可以直接引用,gomod已经写好
需要使用goproxy提供的证书生成方式生成自己的证书

cd ./goproxy/certs/
bash openssl-gen.sh

使用

weiss.Start("7890")
weiss.Stop()

缺陷

Doh方式获取真实ip仍然存在cloudflare套壳的问题,需要及时硬编码更新
可以修改onezero.gohardcodeIpMap达成硬编码的目的
黑名单虽然可以加速超时,但是会影响人机验证

如果有什么更好的方法,欢迎交流

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OneZeroCache = struct {
		Data map[string]string
		Lock sync.RWMutex
	}{make(map[string]string), sync.RWMutex{}}
)
View Source
var (
	PIXIV_API_IP = "210.140.131.199"
)

Functions

func Close

func Close()

func Start

func Start(port string, jsonData string)

Types

type Answer

type Answer struct {
	Type int    `json:"type"`
	TTL  int    `json:"TTL"`
	Data string `json:"data"`
}

type OneZeroReq

type OneZeroReq struct {
	// contains filtered or unexported fields
}

func (*OneZeroReq) PrePare

func (oneZeroReq *OneZeroReq) PrePare() (*string, error)

type OneZeroRes

type OneZeroRes struct {
	Status   int        `json:"Status"`
	TC       bool       `json:"TC"`
	RD       bool       `json:"RD"`
	RA       bool       `json:"RA"`
	AD       bool       `json:"AD"`
	CD       bool       `json:"CD"`
	Question []Question `json:"Question"`
	Answer   []Answer   `json:"Answer"`
}

type Question

type Question struct {
	Name string `json:"name"`
	Type int    `json:"type"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL