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

I have some question with your version #3

Open
Edemilorhea opened this issue Apr 5, 2022 · 3 comments
Open

I have some question with your version #3

Edemilorhea opened this issue Apr 5, 2022 · 3 comments

Comments

@Edemilorhea
Copy link

First thanks a lot you great contribution for no-english languages people.

I want to ask two question.

  1. I build the chevereto use linuxserver/Chevereto, But I want Chinese so , replace your /app in container /app

I don't know, how does it have any problem? but it's good now.
And then I don't know linuxserver/Chevereto setting still work of replace your version after?

  1. Can I ask your version is can get user real ip?
    cause I use Chevereto now, but I find out every user login ip and upload ip as same, it is my docker ip 172.17.0.1.
    I want get thier real ip, how can i do

如果您可以看得懂中文,我可以再用中文解釋一次,因為我的英文不是很好。

@keven1024
Copy link
Owner

关于1,理论上应该可以,我是使用linuxserver的1.4.1镜像直接替换来的。不过还是建议替换前做好原来文件和sql数据库的备份。

image

image

关于2,目前我的代码没有对这个进行修改,如果您使用docker仍然会得到172.17.0.1,但是我记得chevereto有一个函数可能是这个

function get_client_ip()

可以尝试将函数中的 $_SERVER['REMOTE_ADDR']换成其他以获取正确的ip地址。如果使用cloudflare可以直接替换成 $_SERVER['HTTP_CF_CONNECTING_IP']
参考链接:https://stackoverflow.com/questions/4262081/serverremote-addr-gives-server-ip-rather-than-visitor-ip

@Edemilorhea
Copy link
Author

其實我也是先安裝 最新的linuxserver/chevereto 再把您的檔案整包覆linux的app資料夾。

  1. 替換後延續問題

因為我這樣做是可以Run的,但有卡登入之問題,不知道您是否有遇過?

我使用Edge登入了之後,若contianer有做更動 ( 例如換網址 ) 或是某些動作 ( 因為我不確定我到底動了甚麼,唯一有印象就是換網址 )

用同一個瀏覽器輸入帳號密碼按下登入,畫面會直接跳回首頁,右上角並沒有登入,但是我去看資料庫的寫入是使用cookie登入成功的,但就是進不去,不過若是用無痕模式卻能登入,我唯一發現的解決方式就是清除Edge的cookie,但這樣我覺得很不方便,還在找解決方法。

2.真實IP問題
其實我在昨晚的實測後,我應該算是找到問題發生點了,我在 Synology 的 Docker 上架設的時候,我使用了"Web網頁管理"這個選項,因為我本想用虛擬主機的Namebase去對應網址,但如果用這個方法,就會導致Chevereto抓不到真實IP。

image

最終解決方法就是一樣用額外的Port去對應80跟443,在使用反向代理將網址對應到Chevereto的port。

這個問題,我不清楚發生原理,因為我的網路相關的技術知識不足,或許修改裡面的nginx.conf,也或許是您說的get_client_ip()上的問題,目前已經解決問題,這方面我以後再研究。

3.存储掛載問題
另外我看到您的圖片上使用 "存儲空間" 直接掛載 /app/chevereto ,原來這樣是可以的嗎?
我上次直接掛載/app 我的container瘋狂報錯,我以為真的只能掛他們開放的/data跟/config

4.中文化問題
想請問是否可以透漏,你是如何把他們中文化的,我按照網路上其他教程的方法,套用在linuxserver/Chevereto上,也是會瘋狂報錯,下載了您的soruce code來看,除了加上去languages的路徑以及舊的gettxt文檔,好像沒有甚麼特別的了?

不知道您是怎麼做到的,希望前輩能指點一二。

最終,無論如何非常感謝您,您為了中文用戶做出的巨大貢獻!!

@keven1024
Copy link
Owner

keven1024 commented Apr 15, 2022

1。这个问题我使用edge目前无法复现,帮不了您

3。/app/chevereto 能挂载是因为我在被映射的目录里放了chevereto 1.6.2 的php 源码,如果不放的话肯定报错。

4。中文化没什么含金量的,其实如果你有观察本仓库所有的提交log,你会发现本仓库和原来的https://github.com/rodber/chevereto-free 仓库log几乎一样,倒是其中几个remove language的提交失踪了。
没错,我就只是把代码回滚到1.4.1版本,然后把rodber大佬 删语言的那几个 提交单独删掉,再一路合并代码到1.6.2。
其实能汉化成功还得感谢rodber大佬 良好的代码习惯,每一个操作都详细的写在提交里,不然也不会有本仓库了。

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