Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

访问不了实际图片和内容 #6

Open
006lp opened this issue Jun 19, 2024 · 2 comments
Open

访问不了实际图片和内容 #6

006lp opened this issue Jun 19, 2024 · 2 comments

Comments

@006lp
Copy link

006lp commented Jun 19, 2024

picacomic.com在中国大陆被墙,无法访问
所以大部分资源都看不了,
能不能像pixivnow一样用cf worker做个反代,如果可以的话,能不能顺便写一下cf worker反代的代码

@Hanze-C
Copy link

Hanze-C commented Dec 1, 2024

cf worker代码在这里
https://github.com/Hanze-C/Proxy-Cf

Deploy to Cloudflare Workers

在CF部署完后修改以下文件

api/utils.ts (Line 38-47)

// String
if (typeof val === 'string') {
  if (val.startsWith('https://')) {
    obj[key] = val
      .replace('storage1.picacomic.com', 'proxy.your-domain.com/proxy/s3.picacomic.com')
      .replace('storage-b.picacomic.com', 'proxy.your-domain.com/proxy/s3.picacomic.com')
      .replace('img.picacomic.com', 'proxy.your-domain.com/proxy/s3.picacomic.com')
      .replace('www.picacomic.com', 'pica-pica.wikawika.xyz')
  }
}

将proxy.your-domain.com替换为你的域名

@006lp
Copy link
Author

006lp commented Dec 1, 2024

谢谢

cf worker代码在这里 https://github.com/Hanze-C/Proxy-Cf

Deploy to Cloudflare Workers

在CF部署完后修改以下文件

api/utils.ts (Line 38-47)

// String
if (typeof val === 'string') {
  if (val.startsWith('https://')) {
    obj[key] = val
      .replace('storage1.picacomic.com', 'proxy.your-domain.com/proxy/s3.picacomic.com')
      .replace('storage-b.picacomic.com', 'proxy.your-domain.com/proxy/s3.picacomic.com')
      .replace('img.picacomic.com', 'proxy.your-domain.com/proxy/s3.picacomic.com')
      .replace('www.picacomic.com', 'pica-pica.wikawika.xyz')
  }
}

将proxy.your-domain.com替换为你的域名

谢谢,我去试试看

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants