GithubHelp home page GithubHelp logo

swaggymacro / cs2-weaponpaints-website Goto Github PK

View Code? Open in Web Editor NEW
16.0 3.0 4.0 47.25 MB

Website for Nereziel/cs2-WeaponPaints plugins

License: GNU General Public License v3.0

JavaScript 65.58% CSS 16.48% EJS 17.93% Batchfile 0.01%

cs2-weaponpaints-website's Introduction

🗣️Preface

This repo is a modified version of cs2-WeaponPaints-website, which has localized skin images(Chinese Language Only) and complete Chinese translation, as well as added support for glove change, and optimized the original request part Prevent an abundance of redundant requests about JSON files., the original project will make dozens of requests for JSON files of skin weapons.

modified list:

  • Localized skin, agent images (Chinese Language Only, You shouldn't need this if you are not in China.)
  • Support glove change
  • Support music kit change
  • optimized the original request part

Btw, the original project got a private plan, You guys can donate to the original author to get the private plan. The private plan has more features like gloves change, workshop(Idk what's this, It seems like a backend that can be used to manage the user's skins, but I'm not sure about this.).

This repo is a modified version. If you need the private plan, Please go to the original author's repository.

📝Before Start

You can step out of this section if you are not in China or you don't wanna localize the images.

  • You need download this repo counter-strike-image-tracker
  • extract static/panorama/images to src/public/images folder.
  • Replace all url https://raw.githubusercontent.com/ByMykel/counter-strike-image-tracker/main/static/panorama/images to /images in src/public/js/json/skins/{lang}-skins.json and src/public/js/json/skins/{lang}-agents.json.

The images folder size will be around 1.16GB. The reason for localizing the images is nothing else, because Github loads slowly in China, so I chose to localize them, you don't need this step if you are not in China.

📸Screenshots

Weapon, agent, knife, glove Skin Plugin from cs2-WeaponPaints

🖥️Installation

Dependencies: Node.js 17 or higher version (But I tried Node.js 16, also working fine.)

  • Clone the latest code of this repo.
  • Copy src/config.example.json to config.json and fill in the information.
  • Fill in lang with en to use english, other languages please refer to src/lang folder.
{
    "name": "Title of your website",
    "lang": "en", 
    "DB": {
        "DB_HOST": "host",
        "DB_USER": "username",
        "DB_PASS": "password",
        "DB_DB": "database name"
    },
    "HOST": "example.com or localhost/127.0.0.1",
    "SUBDIR": "/skinsExample/ or just /",
    "PORT": 27075,
    "STEAMAPIKEY": "Your Steam Web API Key",
    "connect": {
        "show": true,
        "url": "steam://connect/[IP:PORT]?appid=730/[Server password if needed]"
    }
}
  • Then run the following commands:

Windows:

  npm i
  npm run start

Linux:

  npm i
  npm run startLinux

cs2-weaponpaints-website's People

Contributors

swaggymacro avatar

Stargazers

JasonLee avatar guugugu avatar  avatar  avatar Jerry233 avatar ZINT avatar Exa avatar  avatar  avatar wudi7mi avatar  avatar Ktm avatar xiaodo avatar  avatar  avatar  avatar

Watchers

xiaodo avatar  avatar  avatar

cs2-weaponpaints-website's Issues

InternalOpenIDError: Failed to discover OP endpoint URL

点击登录遇到问题:

InternalOpenIDError: Failed to discover OP endpoint URL
    at /data/user23202791/lgsm/wp_manage/node_modules/@passport-next/passport-openid/lib/passport-openid/strategy.js:249:52
    at /data/user23202791/lgsm/wp_manage/node_modules/openid/openid.js:757:14
    at /data/user23202791/lgsm/wp_manage/node_modules/openid/openid.js:547:13
    at /data/user23202791/lgsm/wp_manage/node_modules/openid/openid.js:503:11
    at /data/user23202791/lgsm/wp_manage/node_modules/openid/http.js:41:9
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

一开始认为是网络连接问题,配置了 steamcommunity 302 之后测试连接社区页面正常:

(base) user23202791@Ubuntu-6-3090:~/lgsm/wp_manage$ curl https://steamcommunity.com/openid
<?xml version="1.0" encoding="UTF-8"?>
<xrds:XRDS xmlns:xrds="xri://$xrds" xmlns="xri://$xrd*($v*2.0)">
        <XRD>
                <Service priority="0">
                        <Type>http://specs.openid.net/auth/2.0/server</Type>
                        <URI>https://steamcommunity.com/openid/login</URI>
                </Service>
        </XRD>
</xrds:XRDS>

(base) user23202791@Ubuntu-6-3090:~/lgsm/wp_manage$ curl https://steamcommunity.com
<!DOCTYPE html>
<html class=" responsive" lang="en">
<head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
                        <meta name="viewport" content="width=device-width,initial-scale=1">
                <meta name="theme-color" content="#171a21">
                <title>Steam Community</title>
        <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
......(后面网页内容省略)

但是点击登录后上述问题依然存在,请问是否可能是其他问题?

无法启动 message: 'Claimed identity is invalid.'

请问这是什么问题导致的?抱歉我看不懂报错...

root@armbian:~/skin# npm run startLinux

> [email protected] startLinux
> nodemon -x 'node . || touch src/app.js'

[nodemon] 3.1.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting `node . || touch src/app.js`
/root/skin/node_modules/passport-steam/lib/passport-steam/strategy.js:108
    if (!req.query['openid.claimed_id']?.startsWith(OPENID_CHECK.claimed_id)) return done(null, false, { message: 'Claimed identity is invalid.' });
                                        ^

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/root/skin/node_modules/passport-steam/lib/passport-steam/index.js:2:16)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
[nodemon] clean exit - waiting for changes before restart
[nodemon] restarting due to changes...
[nodemon] starting `node . || touch src/app.js`
/root/skin/node_modules/passport-steam/lib/passport-steam/strategy.js:108
    if (!req.query['openid.claimed_id']?.startsWith(OPENID_CHECK.claimed_id)) return done(null, false, { message: 'Claimed identity is invalid.' });
                                        ^

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/root/skin/node_modules/passport-steam/lib/passport-steam/index.js:2:16)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
[nodemon] clean exit - waiting for changes before restart
[nodemon] Internal watch failed: ENOSPC: System limit for number of file watchers reached, watch '/root/skin/src/public/images/econ/stickers/katowice2019/sig_bntet_png.png'

Doesn't work in all browsers

For some reason the website does not work on all browsers. So it doesn't work in steam browser, but it works in chrome. The buttons don't work, when pressing knives or gloves, for example. But at the same time, authorization works in any browser. What could be causing this?

Access Denied

点击登陆后跳转到白底黑字页面,内容如下:

Access Denied
You don't have permission to access "http://steamcommunity.com/openid/login?" on this server.
Reference #18.1452c817.1713196703.35adbc75

https://errors.edgesuite.net/18.1452c817.1713196703.35adbc75

src/config.json 中填写 "PROTOCOL": "https" 和 "PROTOCOL": "http" 均出现该现象;如果删去 PROTOCOL 字段则可以跳转登陆,但登陆后显示 Invalid return protocol。

Invalid Url

目前修复了前几天提交的issue问题 使用境外服务器,但是现在显示invalid url
如图所示。
请指导一下如何修复此错误
Screenshot_20240428_222734

How can I fix it

如何修复此错误(进入网站点击Steam登录):

InternalOpenIDError: Failed to discover OP endpoint URL
    at C:\Users\Administrator\Desktop\cs2-WeaponPaints-Website-0.2.2\node_modules\@passport-next\passport-openid\lib\passport-openid\strategy.js:249:52
    at C:\Users\Administrator\Desktop\cs2-WeaponPaints-Website-0.2.2\node_modules\openid\openid.js:757:14
    at C:\Users\Administrator\Desktop\cs2-WeaponPaints-Website-0.2.2\node_modules\openid\openid.js:547:13
    at C:\Users\Administrator\Desktop\cs2-WeaponPaints-Website-0.2.2\node_modules\openid\openid.js:503:11
    at C:\Users\Administrator\Desktop\cs2-WeaponPaints-Website-0.2.2\node_modules\openid\http.js:41:9
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

感谢

InternalOpenIDError: Failed to discover OP endpoint URL

InternalOpenIDError: Failed to discover OP endpoint URL
at E:\cs2skin\node_modules@passport-next\passport-openid\lib\passport-openid\strategy.js:249:52
at E:\cs2skin\node_modules\openid\openid.js:757:14
at E:\cs2skin\node_modules\openid\openid.js:547:13
at E:\cs2skin\node_modules\openid\openid.js:503:11
at E:\cs2skin\node_modules\openid\http.js:41:9
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

image

code : 1 message : "Session ID unknown"

image
image

[config.json]
PROTOCOL:http Port:80

这个是网站:http://csl1mit.icu/ 虽然登录之后跳转了 但是并没有成功的登录 我大概查了一下socket.io文档有说 没有开启粘性会话会导致 但是我没有node.js的开发经验无从下手。

还有一些BUG.
默认的配置文件中
image
PROTOCOL项必须修改为http port必须修改为80 如果按照默认的配置开启服务器后 进入网站登录后的地址会变为 https://域名....
而且不带端口号
屏幕截图 2024-03-27 031420

从而被拒绝连接 而一开始进入的时候则不是https 而是http 屏幕截图 2024-03-27 031336

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.