Open xyc0123456789 opened 1 year ago
I dont know your modification detail , but maybe your .env cookie or chat id or channel has wrong if you use proxy i dont suggest you config your http proxy in golang , because the websocks also need proxy like poerequest, normally we use clash and use it tun mode about clash u can fount in github
Star before asking, it's free,thax
I just modify the function PoeRequest
code from
client := &http.Client{}
to
proxyUrl, _ := url.Parse("http://127.0.0.1:7078")
client := &http.Client{
Transport: &http.Transport{
Proxy: http.ProxyURL(proxyUrl),
},
}
and import "net/url" with rename the origin function's local variable "url" to "urlStr"
I used clash on windows locally and opened 127.0.0.1:7078 system proxy
I have checked the .env cookie ,chat id and channel. It's correct
I found codes like os.Getenv("POE_COOKIE")
, do I need to configure environment variables instead of modifying the. env file?
you dont need to change any windows env variable , am sure it also run on windows ,but you can try set windows env var when the time of I am replying u , the repo run normal
and must have notice you , if you run the repo on not tun mode which can proxy all network traffic , you cant use websockets so you cant run the repo normally
Oh...I log the ChatID and I found ChatID=0 , os.Getenv("POV_CHAT_ID")
,Not "POE_CHAT_ID".
It's from github.com\isxuelinme\poe_unoffical_api@v1.2.2\core
I am sure it's can run on windows you dont need to manually to set the system env var but if you cant run again ,you could manual set it if still not run , you can re pull all code try again , because before few days , I have changed some code maybe you dont pull latest
I am sure it's can run on windows you dont need to manually to set the system env var but if you cant run again ,you could manual set it if still not run , you can re pull all code try again , because before few days , I have changed some code maybe you dont pull latest
Thank you for your help ! I ran successfully!
I am sure it's can run on windows you dont need to manually to set the system env var but if you cant run again ,you could manual set it if still not run , you can re pull all code try again , because before few days , I have changed some code maybe you dont pull latest
Thank you for your help ! I ran successfully!
you are welcome , using english for help another lang people, dont mind , did you manual set env on windows ?
I am sure it's can run on windows you dont need to manually to set the system env var but if you cant run again ,you could manual set it if still not run , you can re pull all code try again , because before few days , I have changed some code maybe you dont pull latest
Thank you for your help ! I ran successfully!
you are welcome , using english for help another lang people, dont mind , did you manual set env on windows ?
no, I didn't
I clone the repository and reinstall the mod , add follew code to go.mod, reVendor the example
replace github.com/isxuelinme/poe_unoffical_api => path\to\poe_unoffical_api
I am sure it's can run on windows you dont need to manually to set the system env var but if you cant run again ,you could manual set it if still not run , you can re pull all code try again , because before few days , I have changed some code maybe you dont pull latest
Thank you for your help ! I ran successfully!
you are welcome , using english for help another lang people, dont mind , did you manual set env on windows ?
no, I didn't I clone the repository and reinstall the mod , add follew code to go.mod, reVendor the example
replace github.com/isxuelinme/poe_unoffical_api => path\to\poe_unoffical_api
good , I guess the cause from go tag and go mirror , thank you tell me .
Another problem. the default BACKEND_PORT = 6000 will cause browser ERR_UNSAFE_PORT error.Let BACKEND_PORT = 8090 will solve the problem
Another problem. the default BACKEND_PORT = 6000 will cause browser ERR_UNSAFE_PORT error.Let BACKEND_PORT = 8090 will solve the problem
sure on windows it is cant run , I will change the default port to another .
Another problem. When I run it on ubuntu with nohup go run main.go >nohup.out 2>&1 &
go-sse:******
will full screen,It seems to be caused by the code Logger: log.New(os.Stdout, "go-sse: ", log.LstdFlags)
which because sseServer = sse.NewServer(nil)
options is nil
use screen dont use nohup, more about screen you can ask chatgpt
Logger: log.New(os.Stdout
It just causes something strange. The go:see*****
log can't redirect to the file by the command nohup go run main.go >nohup.out 2>&1 &
1、 I open two terminal,
2、On terminal A start and stop the app
3、 then I start app with SSE on terminal B with nohup.
4、request GO server By curl on terminal A
5、 The go-sse:******
log on terminal A
6、 I start a JAVA app on terminal A. When JAVA request GO server ,go-sse:******
log will show on terminal with command tail
It just causes something strange. The
go:see*****
log can't redirect to the file by the commandnohup go run main.go >nohup.out 2>&1 &
1、 I open two terminal, 2、On terminal A start and stop the app 3、 then I start app with SSE on terminal B with nohup. 4、request GO server By curl on terminal A 5、 Thego-sse:******
log on terminal A 6、 I start a JAVA app on terminal A. When JAVA request GO server ,go-sse:******
log will show on terminal with command tail
I know why the error happened , cause nohup just a stdout redirect so I dont recommand you use that , maybe you can set log.SaveFunc to satisfy your asking
I will test it when I have a bit free time before it , I suggest you use screen , nohup is a old era command use command : sudo apt install screen but almost default installed
sudo apt install screen
Thank you! I'll try it!
There seem something wrong. When I open th peo.com , I found message from backend was sent to sage, but socket read from chatgpt.
open poe.com open soga tab input something and rerun javascript got channel and chat_id reset your env file will be normal
I made a modification to the function PoeRequest in
github.com/isxuelinme/poe_unoffical_api/core/poe.go
Did I do something wrong somewhere?