Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Ability to use intermediate server #109

Open
wants to merge 101 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
c84bd90
grpc added
rezaUniqe Nov 14, 2022
56aa07d
added Mirror db model
amir215909 Nov 14, 2022
210c308
added IndexService
amir215909 Nov 14, 2022
0230f60
setting up mirrors table
amir215909 Nov 14, 2022
44c30d5
added MirrorIndexController
amir215909 Nov 14, 2022
8462ff1
registered MirrorIndexController
amir215909 Nov 14, 2022
f19d013
mirror page added
rezaUniqe Nov 14, 2022
7d3ef49
changed port to be int instead of string
amir215909 Nov 14, 2022
e1dec37
added storeMirrorRequestBody.go
amir215909 Nov 14, 2022
b4f62f2
added storeService.go
amir215909 Nov 14, 2022
0023431
added storeMirror.go
amir215909 Nov 14, 2022
23d28d1
registered store mirror controller
amir215909 Nov 14, 2022
f8b4da6
Merge branch 'feature/mirror-index-api' into develop
amir215909 Nov 14, 2022
e2a5d86
prefix mirror apis , with api
amir215909 Nov 15, 2022
180449b
added input
rezaUniqe Nov 15, 2022
79f0aac
Merge branch 'develop' into reza
rezaUniqe Nov 15, 2022
19c53bb
refactored to return response from add inbound api
amir215909 Nov 15, 2022
9074880
renamed file to follow go convention
amir215909 Nov 16, 2022
ec2faa5
added show api for inbound
amir215909 Nov 16, 2022
838ea10
renamed file to follow go convention
amir215909 Nov 16, 2022
a3dfa72
following go convention
amir215909 Nov 16, 2022
da9fb18
added mirror page with mirror modal
rezaUniqe Nov 16, 2022
170f6ac
added mirrors to qr code
rezaUniqe Nov 16, 2022
f82b32c
added mirrors to qr code
rezaUniqe Nov 16, 2022
64f8032
Merge branch 'feature/refactor-and-inbound-show-api' into develop
amir215909 Nov 16, 2022
cd2e0c3
Merge branch 'main' into develop
amir215909 Nov 17, 2022
417fd5c
renamed method
amir215909 Nov 17, 2022
f1717ca
added translation key
amir215909 Nov 17, 2022
04be729
added SuccessResponse struct
amir215909 Nov 17, 2022
4517157
added ListResponse struct
amir215909 Nov 17, 2022
f34a312
added BaseAPIController for backend
amir215909 Nov 17, 2022
320717a
updated go version to 1.18 and added samber/lo dependency
amir215909 Nov 17, 2022
b870ea0
using base api controller instead of base controller
amir215909 Nov 17, 2022
fc9bd13
standardized api routes, improved api responses
amir215909 Nov 17, 2022
766e5c4
removed InboundController from xui controller which should be part of…
amir215909 Nov 17, 2022
e5c6a26
added some translations
amir215909 Nov 17, 2022
aca82a7
Merge branch 'feature/refactor' into develop
amir215909 Nov 17, 2022
5eb25ce
added fa translation
rezaUniqe Nov 17, 2022
7bea7d8
added store_inbound_request_body.go
amir215909 Nov 18, 2022
4005e25
reformat and changed port taken chinese message to english
amir215909 Nov 18, 2022
4fd5b2f
improved separation of concerns by separating request model from db m…
amir215909 Nov 18, 2022
d75372e
added swagger
amir215909 Nov 18, 2022
7462760
added client_statistics to inbound response
amir215909 Nov 18, 2022
aae1c16
cleaned login api responses
amir215909 Nov 19, 2022
05811d5
updated english translation of success login response
amir215909 Nov 19, 2022
3b6aa51
added UpdateInboundRequestBody
amir215909 Nov 19, 2022
e961f92
using UpdateInboundRequestBody instead of model for parsing request body
amir215909 Nov 19, 2022
da37c70
add docs for update inbound and login apis
amir215909 Nov 19, 2022
f6dcdd3
added client_statistics to InboundResponse
amir215909 Nov 19, 2022
47f9f6b
Merge branch 'feature/refactor' into develop
amir215909 Nov 19, 2022
807a9ad
Merge branch 'reza' into feature/merge-amir-reza
rezaUniqe Nov 19, 2022
c97cde1
settings,stream setting,sniffings turned to base64 and new api http e…
rezaUniqe Nov 19, 2022
37c18e8
added error handler
rezaUniqe Nov 19, 2022
c62d363
added error handler
rezaUniqe Nov 19, 2022
3717adb
Merge remote-tracking branch 'origin/feature/merge-amir-reza' into de…
amir215909 Nov 20, 2022
38fc0b2
combined mirror controllers
amir215909 Nov 20, 2022
8c4c549
Merge remote-tracking branch 'upstream/main' into develop
amir215909 Nov 20, 2022
19c8fad
changed mirror api endpoint
rezaUniqe Nov 20, 2022
e7d0c92
fixed expiry time bug
rezaUniqe Nov 20, 2022
2745db5
trojan client schema change to mulple clients
rezaUniqe Nov 20, 2022
52ef3c9
add copy button to multiple clients
rezaUniqe Nov 20, 2022
36b47c2
add copy button to multiple clients
rezaUniqe Nov 20, 2022
b6edd44
Merge branch 'upstream-main' into develop
amir215909 Nov 21, 2022
979f819
change websocket port
rezaUniqe Nov 21, 2022
0017e82
change websocket port
rezaUniqe Nov 21, 2022
0c57327
trojan client qr added
rezaUniqe Nov 21, 2022
447497b
trojan client qr added
rezaUniqe Nov 21, 2022
138a749
removed port change
rezaUniqe Nov 21, 2022
5fc094f
removed console logs
rezaUniqe Nov 21, 2022
3d13441
readme updated
rezaUniqe Nov 21, 2022
9caf804
Merge remote-tracking branch 'origin/develop' into develop
amir215909 Nov 22, 2022
652434e
updated xray binary
amir215909 Nov 22, 2022
e8c4f49
merge 0.5.3
amir215909 Nov 22, 2022
a6a7216
Merge branch 'upstream-main' into develop
amir215909 Nov 22, 2022
82eb7e0
refactor
amir215909 Nov 22, 2022
ff879fd
improve performance
amir215909 Nov 22, 2022
0975ef8
improved mirror api responses
amir215909 Nov 22, 2022
a18a4fa
returning 201 instead of 200 on successful mirror creation
amir215909 Nov 22, 2022
90067ca
added swagger documentation for mirror apis
amir215909 Nov 22, 2022
07f0ba0
revert to 56ed8f35
rezaUniqe Nov 23, 2022
c3ce834
deleted unused files
rezaUniqe Nov 23, 2022
4e657a8
Merge remote-tracking branch 'origin/develop' into develop
rezaUniqe Nov 23, 2022
a619d30
refactor clearClientIps api
amir215909 Nov 23, 2022
06961ed
Merge remote-tracking branch 'origin/develop' into develop
amir215909 Nov 23, 2022
617da2c
Merge branch 'upstream-main' into develop
amir215909 Nov 23, 2022
7d22f14
changed response
rezaUniqe Nov 23, 2022
eea17ba
repetitive button
rezaUniqe Nov 23, 2022
048d982
Revert "updated xray binary"
amir215909 Nov 23, 2022
429b2b9
repetitive button
rezaUniqe Nov 23, 2022
f04fb67
removed duplicate import
amir215909 Nov 23, 2022
ce63886
removed debug print
amir215909 Nov 23, 2022
4d65745
fixed mirrors and added github link
rezaUniqe Nov 23, 2022
e85b6fb
Merge remote-tracking branch 'origin/develop' into develop
rezaUniqe Nov 23, 2022
d12ea15
fixed getting mirrors in qr model
rezaUniqe Nov 23, 2022
71dd416
Merge branch 'bugfix/pr-bug' into develop
amir215909 Nov 23, 2022
7470ac1
added random email to vless , vmess ,trojan and deleted duplicated pa…
rezaUniqe Nov 24, 2022
8cd3922
added message to new api
rezaUniqe Nov 24, 2022
c5ab4c6
client ips api route changed
rezaUniqe Nov 24, 2022
2cb09f0
fixed add client ip recourds
rezaUniqe Nov 24, 2022
a10a341
added password for each client added xtls flow inside each client form
rezaUniqe Nov 26, 2022
aca060c
Merge branch 'upstream-main' into develop
amir215909 Nov 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
> **Disclaimer: This project is only for personal learning and communication, please do not use it for illegal purposes, please do not use it in a production environment**



xray panel supporting multi-protocol, **Multi-lang (English,Chinese)**, **IP Restrication Per Inbound**

| Features | Enable? |
Expand Down
Empty file added bin/blockedIPs
Empty file.
16 changes: 7 additions & 9 deletions bin/geosite.dat
Original file line number Diff line number Diff line change
Expand Up @@ -4227,7 +4227,7 @@ debank.com dogecoin.com  infura.iomytokenapi.com
kraken.com okex.com
opensea.io
paxful.com truefi.io uniswap.org zapper.fi
�L
�L
CATEGORY-DEVanaconda.cloud anaconda.com anaconda.org conda.io android.comandroidify.comappleswift.com swift.org
swiftui.cn
cnswiftui.com.cn
Expand Down Expand Up @@ -4319,7 +4319,6 @@ elrepo.org
erlang.org
ffmpeg.org freebsd.org
gentoo.orggetcomposer.org getzola.org git-scm.com gnu.orggreenend.org.uk
hex.pm
ius.io
jenkins.io
js.org jupyter.org kali.orglinuxfromscratch.orglinuxmint.com lua.org macports.org mariadb.org mingw.org mobatek.net mysql.com nixos.orgnodesource.comnotepad-plus-plus.org
Expand Down Expand Up @@ -5364,7 +5363,7 @@ comsoc.org embs.org emcs.org grss-ieee.org ieee-aess.org
change.org f-droid.orgglobalsecurity.org iana.org ietf.org itu.int opte.org smpte.org
un.org
w3.org who.int wto.org
��
��
CATEGORY-PORN
18comic.cc18comic.company 18comic.org 18comic.vip
jmcomic.me jmcomic.mobi jmcomic.moejmcomic1.city jmcomic1.mejmcomic1.mobi jmcomic2.moe 54647.global 54647.io 54647.online 54647.org avmoo.click avmoo.com tellme.pw bili2.cc bili888.com bili999.com($(^|\.)bilibili3(0[1-9]|1[0-2])\.xyz$
Expand All @@ -5376,7 +5375,7 @@ bttzyw.com
bttzyw.net c4slive.comclips4sale.comvideos4sale.comdigitalplayground.com digitalplaygroundnetwork.com chobit.cc ci-en.net
dlsite.comdlsite.com.twdlsitestudio.com nijiyome.jp triokini.com dmm.co.jp
dmmrex.com e-hentai.org ehgt.orgehtracker.org
ehwiki.org exhentai.org hath.networkhentaiathome.nethentaiverse.org ero-labs.com ero-labs.netero-labs.onlineerolabs.cloud erolabs.com erolabs.game erolabs.net heydoga.com heyzo.comillusion.co.jp illusion.jp acgcf.com acgdg.com acgdv.com acgfabu.com
ehwiki.org exhentai.org hath.networkhentaiathome.nethentaiverse.org ero-labs.com ero-labs.neterolabs.cloud erolabs.com erolabs.game erolabs.net heydoga.com heyzo.comillusion.co.jp illusion.jp acgcf.com acgdg.com acgdv.com acgfabu.com
acgfbw.com acgvipss.com acgwr.com aishegw.com
clincha.cnfabuyemian.comillusion111.comillusionas.comillusionchn.comillusionfb.cnillusiongw.comillusionh.comillusionl.comillusionn2.comillusionn3.comillusionn4.comillusionn5.comillusionxz.comillusiony.comillusionze.com illusnoi.com isgame365.cc isheppc.com lliusno.comnoisullifb.comwnoaissulli1.com yiqilai99.cn
zzycdz.com cdnlab.live jable.tv
Expand Down Expand Up @@ -7862,8 +7861,8 @@ etviet.comlagranepoca.com minghui.org ntd.com
ntdimg.com ntdtv.ca ntdtv.co.kr ntdtv.com ntdtv.com.tw ntdtv.jp ntdtv.kr ntdtv.org ntdtv.ru ntdtv-dc.com ntdtvla.com ntdvn.compersianepochtimes.comrenminbao.comtheepochtimes.comtheepochtimessubscribe.comvelkaepocha.cz

ERJI erji.net
�
EROLABS ero-labs.com ero-labs.netero-labs.onlineerolabs.cloud erolabs.com erolabs.game erolabs.net
t
EROLABS ero-labs.com ero-labs.neterolabs.cloud erolabs.com erolabs.game erolabs.net
�
ESPN dtci.codtci.technology
espn.co.uk espn.com espn.net espncdn.com
Expand Down Expand Up @@ -8031,7 +8030,7 @@ gcores.com
GEETEST geetest.com#geetest.datasink.sensorsdata.cn
`
GEMFURY fury.blog fury.co fury.dev fury.help fury.io gemfury.com
��
��
GEOLOCATION-!CNgovmileduacadaeafagalamanaoaqaratauawaxazbabgbhbibjbmbnbobrbsbvbwbybzcacdcgclcmcrcucwcxcyczdedkdzecegehereseufifjfkfofrgagbgdgeghgiglgmgngrgsgtgugwgyhkhnhthuieiliniqirjejmjojpkekhkiknkpkrkwkykzlblclilklrlsltlulymamcmdmfmgmhmkmnmompmqmrmtmumwmxmymznancnenfngninlnonpnrnunzompapepfpgphplpnrerorurwsascsdsesgsisjskslsnsrssstsusvsxsysztctdtfthtjtktltmtntotptrtttwtzuaugukumusuyuzvavcvevgvivnvuwfytzazmzwaflmlbnbanflnra averybbbbcgcebcrsdnbdnpdunsdvagerni globalxice locus mckinsey olayangroup
olayan praxisapseek
vistaprint vistawtc xerox athletabananarepublic bloomberg boots calvinklein cartier chloegap gucci
Expand Down Expand Up @@ -9199,7 +9198,7 @@ btt904.com
bttzyw.com
bttzyw.net c4slive.comclips4sale.comvideos4sale.comdigitalplayground.com digitalplaygroundnetwork.com dmm.co.jp
dmmrex.com e-hentai.org ehgt.orgehtracker.org
ehwiki.org exhentai.org hath.networkhentaiathome.nethentaiverse.org ero-labs.com ero-labs.netero-labs.onlineerolabs.cloud erolabs.com erolabs.game erolabs.net heydoga.com heyzo.comillusion.co.jp illusion.jp acgcf.com acgdg.com acgdv.com acgfabu.com
ehwiki.org exhentai.org hath.networkhentaiathome.nethentaiverse.org ero-labs.com ero-labs.neterolabs.cloud erolabs.com erolabs.game erolabs.net heydoga.com heyzo.comillusion.co.jp illusion.jp acgcf.com acgdg.com acgdv.com acgfabu.com
acgfbw.com acgvipss.com acgwr.com aishegw.com
clincha.cnfabuyemian.comillusion111.comillusionas.comillusionchn.comillusionfb.cnillusiongw.comillusionh.comillusionl.comillusionn2.comillusionn3.comillusionn4.comillusionn5.comillusionxz.comillusiony.comillusionze.com illusnoi.com isgame365.cc isheppc.com lliusno.comnoisullifb.comwnoaissulli1.com yiqilai99.cn
zzycdz.com cdnlab.live jable.tv
Expand Down Expand Up @@ -9789,7 +9788,6 @@ elrepo.org
erlang.org
ffmpeg.org freebsd.org
gentoo.orggetcomposer.org getzola.org git-scm.com gnu.orggreenend.org.uk
hex.pm
ius.io
jenkins.io
js.org jupyter.org kali.orglinuxfromscratch.orglinuxmint.com lua.org macports.org mariadb.org mingw.org mobatek.net mysql.com nixos.orgnodesource.comnotepad-plus-plus.org
Expand Down
Binary file modified bin/xray-linux-amd64
Binary file not shown.
11 changes: 10 additions & 1 deletion database/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ func initClientTraffic() error {
return db.AutoMigrate(&xray.ClientTraffic{})
}

func initMirrors() error {
return db.AutoMigrate(&model.Mirror{})
}

func InitDB(dbPath string) error {
dir := path.Dir(dbPath)
err := os.MkdirAll(dir, fs.ModeDir)
Expand Down Expand Up @@ -91,7 +95,12 @@ func InitDB(dbPath string) error {
if err != nil {
return err
}


err = initMirrors()
if err != nil {
return err
}

return nil
}

Expand Down
16 changes: 11 additions & 5 deletions database/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ type Inbound struct {
Sniffing string `json:"sniffing" form:"sniffing"`
}
type InboundClientIps struct {
Id int `json:"id" gorm:"primaryKey;autoIncrement"`
Id int `json:"id" gorm:"primaryKey;autoIncrement"`
ClientEmail string `json:"clientEmail" form:"clientEmail" gorm:"unique"`
Ips string `json:"ips" form:"ips"`
Ips string `json:"ips" form:"ips"`
}

func (i *Inbound) GenXrayInboundConfig() *xray.InboundConfig {
Expand All @@ -73,9 +73,15 @@ type Setting struct {
type Client struct {
ID string `json:"id"`
AlterIds uint16 `json:"alterId"`
Email string `json:"email"`
LimitIP int `json:"limitIp"`
Email string `json:"email"`
LimitIP int `json:"limitIp"`
Security string `json:"security"`
TotalGB int64 `json:"totalGB" form:"totalGB"`
ExpiryTime int64 `json:"expiryTime" form:"expiryTime"`
}
}

type Mirror struct {
Id int `json:"id" gorm:"primaryKey;autoIncrement"`
Ip string `json:"ip"`
Port int `json:"port"`
}
Loading