diff --git a/go.mod b/go.mod index 76d5f8eb..722df287 100644 --- a/go.mod +++ b/go.mod @@ -7,23 +7,23 @@ require ( github.com/gin-contrib/gzip v0.0.6 github.com/gin-gonic/gin v1.9.1 github.com/goccy/go-json v0.10.2 - github.com/mymmrac/telego v0.28.0 + github.com/mymmrac/telego v0.29.1 github.com/nicksnyder/go-i18n/v2 v2.4.0 github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 github.com/pelletier/go-toml/v2 v2.1.1 github.com/robfig/cron/v3 v3.0.1 github.com/shirou/gopsutil/v3 v3.24.1 - github.com/valyala/fasthttp v1.51.0 + github.com/valyala/fasthttp v1.52.0 github.com/xtls/xray-core v1.8.7 go.uber.org/atomic v1.11.0 golang.org/x/text v0.14.0 - google.golang.org/grpc v1.61.0 - gorm.io/driver/sqlite v1.5.4 - gorm.io/gorm v1.25.6 + google.golang.org/grpc v1.61.1 + gorm.io/driver/sqlite v1.5.5 + gorm.io/gorm v1.25.7 ) require ( - github.com/andybalholm/brotli v1.0.6 // indirect + github.com/andybalholm/brotli v1.1.0 // indirect github.com/bytedance/sonic v1.10.2 // indirect github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect github.com/chenzhuoyu/iasm v0.9.1 // indirect @@ -45,10 +45,11 @@ require ( github.com/gorilla/securecookie v1.1.2 // indirect github.com/gorilla/sessions v1.2.2 // indirect github.com/gorilla/websocket v1.5.1 // indirect + github.com/grbit/go-json v0.11.0 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.4 // indirect + github.com/klauspost/compress v1.17.6 // indirect github.com/klauspost/cpuid/v2 v2.2.6 // indirect github.com/leodido/go-urn v1.2.4 // indirect github.com/lufia/plan9stats v0.0.0-20231016141302-07b5767bb0ed // indirect @@ -75,6 +76,7 @@ require ( github.com/ugorji/go/codec v1.2.11 // indirect github.com/v2fly/ss-bloomring v0.0.0-20210312155135-28617310f63e // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect + github.com/valyala/fastjson v1.6.4 // indirect github.com/vishvananda/netlink v1.2.1-beta.2.0.20230316163032-ced5aaba43e3 // indirect github.com/vishvananda/netns v0.0.4 // indirect github.com/xtls/reality v0.0.0-20231112171332-de1173cf2b19 // indirect @@ -82,16 +84,16 @@ require ( go.uber.org/mock v0.4.0 // indirect go4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect golang.org/x/arch v0.6.0 // indirect - golang.org/x/crypto v0.18.0 // indirect + golang.org/x/crypto v0.19.0 // indirect golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.20.0 // indirect - golang.org/x/sys v0.16.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/sys v0.17.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.16.1 // indirect golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 // indirect google.golang.org/protobuf v1.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gvisor.dev/gvisor v0.0.0-20231104011432-48a6d7d5bd0b // indirect diff --git a/go.sum b/go.sum index 8e8b0db6..0c5f04a0 100644 --- a/go.sum +++ b/go.sum @@ -12,8 +12,8 @@ github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8 github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/Calidity/gin-sessions v1.3.1 h1:nF3dCBWa7TZ4j26iYLwGRmzZy9YODhWoOS3fmi+snyE= github.com/Calidity/gin-sessions v1.3.1/go.mod h1:I0+QE6qkO50TeN/n6If6novvxHk4Isvr23U8EdvPdns= -github.com/andybalholm/brotli v1.0.6 h1:Yf9fFpf49Zrxb9NlQaluyE92/+X7UVHlhMNJN2sxfOI= -github.com/andybalholm/brotli v1.0.6/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M= +github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= @@ -124,6 +124,8 @@ github.com/gorilla/sessions v1.2.2 h1:lqzMYz6bOfvn2WriPUjNByzeXIlVzURcPmgMczkmTj github.com/gorilla/sessions v1.2.2/go.mod h1:ePLdVu+jbEgHH+KWw8I1z2wqd0BAdAQh/8LRvBeoNcQ= github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= +github.com/grbit/go-json v0.11.0 h1:bAbyMdYrYl/OjYsSqLH99N2DyQ291mHy726Mx+sYrnc= +github.com/grbit/go-json v0.11.0/go.mod h1:IYpHsdybQ386+6g3VE6AXQ3uTGa5mquBme5/ZWmtzek= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= @@ -136,8 +138,8 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= -github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/klauspost/compress v1.17.6 h1:60eq2E/jlfwQXtvZEeBUYADs+BwKBWURIY+Gj2eRGjI= +github.com/klauspost/compress v1.17.6/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc= github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= @@ -175,8 +177,8 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mymmrac/telego v0.28.0 h1:DNXaYISeZw1J9oB81vCNdskLow8gCRRUJxufqLuH3XE= -github.com/mymmrac/telego v0.28.0/go.mod h1:oRperySNzJq8dRTl24+uBF1Uy7tlQGIjid/JQtHDsZg= +github.com/mymmrac/telego v0.29.1 h1:nsNnK0mS18OL+unoDjDI6BVfafJBbT8Wtj7rCzEWoM8= +github.com/mymmrac/telego v0.29.1/go.mod h1:ZLD1+L2TQRr97NPOCoN1V2w8y9kmFov33OfZ3qT8cF4= github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= github.com/nicksnyder/go-i18n/v2 v2.4.0 h1:3IcvPOAvnCKwNm0TB0dLDTuawWEj+ax/RERNC+diLMM= @@ -288,8 +290,10 @@ github.com/v2fly/ss-bloomring v0.0.0-20210312155135-28617310f63e h1:5QefA066A1tF github.com/v2fly/ss-bloomring v0.0.0-20210312155135-28617310f63e/go.mod h1:5t19P9LBIrNamL6AcMQOncg/r10y3Pc01AbHeMhwlpU= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.51.0 h1:8b30A5JlZ6C7AS81RsWjYMQmrZG6feChmgAolCl1SqA= -github.com/valyala/fasthttp v1.51.0/go.mod h1:oI2XroL+lI7vdXyYoQk03bXBThfFl2cVdIA3Xl7cH8g= +github.com/valyala/fasthttp v1.52.0 h1:wqBQpxH71XW0e2g+Og4dzQM8pk34aFYlA1Ga8db7gU0= +github.com/valyala/fasthttp v1.52.0/go.mod h1:hf5C4QnVMkNXMspnsUlfM3WitlgYflyhHYoKol/szxQ= +github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ= +github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU= github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM= github.com/vishvananda/netlink v1.2.1-beta.2.0.20230316163032-ced5aaba43e3 h1:tkMT5pTye+1NlKIXETU78NXw0fyjnaNHmJyyLyzw8+U= @@ -319,8 +323,8 @@ golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= -golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc h1:ao2WRsKSzW6KuUY9IWPwWahcHCgR0s52IfwutMfEbdM= golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= @@ -338,8 +342,8 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -369,8 +373,9 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -406,14 +411,14 @@ google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoA google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= google.golang.org/genproto v0.0.0-20190306203927-b5d61aea6440/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 h1:gphdwh0npgs8elJ4T6J+DQJHPVF7RsuJHCfwztUb4J4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1/go.mod h1:daQN87bsDqDoe316QbbvX60nMoJQa4r6Ds0ZuoAe5yA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 h1:6G8oQ016D88m1xAKljMlBOOGWDZkes4kMhgGFlf8WcQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917/go.mod h1:xtjpI3tXFPP051KaWnhvxkiubL/6dJ18vLVf7q2pTOU= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= -google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= +google.golang.org/grpc v1.61.1 h1:kLAiWrZs7YeDM6MumDe7m3y4aM6wacLzM1Y/wiLP9XY= +google.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= @@ -434,10 +439,10 @@ gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gorm.io/driver/sqlite v1.5.4 h1:IqXwXi8M/ZlPzH/947tn5uik3aYQslP9BVveoax0nV0= -gorm.io/driver/sqlite v1.5.4/go.mod h1:qxAuCol+2r6PannQDpOP1FP6ag3mKi4esLnB/jHed+4= -gorm.io/gorm v1.25.6 h1:V92+vVda1wEISSOMtodHVRcUIOPYa2tgQtyF+DfFx+A= -gorm.io/gorm v1.25.6/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= +gorm.io/driver/sqlite v1.5.5 h1:7MDMtUZhV065SilG62E0MquljeArQZNfJnjd9i9gx3E= +gorm.io/driver/sqlite v1.5.5/go.mod h1:6NgQ7sQWAIFsPrJJl1lSNSu2TABh0ZZ/zm5fosATavE= +gorm.io/gorm v1.25.7 h1:VsD6acwRjz2zFxGO50gPO6AkNs7KKnvfzUjHQhZDz/A= +gorm.io/gorm v1.25.7/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= gvisor.dev/gvisor v0.0.0-20231104011432-48a6d7d5bd0b h1:yqkg3pTifuKukuWanp8spDsL4irJkHF5WI0J47hU87o= gvisor.dev/gvisor v0.0.0-20231104011432-48a6d7d5bd0b/go.mod h1:10sU+Uh5KKNv1+2x2A0Gvzt8FjD3ASIhorV3YsauXhk= diff --git a/install.sh b/install.sh index 9f46d4df..a9b6711b 100644 --- a/install.sh +++ b/install.sh @@ -82,16 +82,16 @@ fi install_base() { case "${release}" in centos | almalinux | rocky) - yum -y update && yum install -y -q wget curl tar + yum -y update && yum install -y -q wget curl tar tzdata ;; fedora) - dnf -y update && dnf install -y -q wget curl tar + dnf -y update && dnf install -y -q wget curl tar tzdata ;; arch | manjaro) - pacman -Syu && pacman -Syu --noconfirm wget curl tar + pacman -Syu && pacman -Syu --noconfirm wget curl tar tzdata ;; *) - apt-get update && apt install -y -q wget curl tar + apt-get update && apt install -y -q wget curl tar tzdata ;; esac } diff --git a/util/random/random.go b/util/random/random.go index b1dd2e09..1dd47ec9 100644 --- a/util/random/random.go +++ b/util/random/random.go @@ -2,7 +2,6 @@ package random import ( "math/rand" - "time" ) var numSeq [10]rune @@ -13,8 +12,6 @@ var numUpperSeq [36]rune var allSeq [62]rune func init() { - rand.Seed(time.Now().UnixNano()) - for i := 0; i < 10; i++ { numSeq[i] = rune('0' + i) } @@ -41,3 +38,7 @@ func Seq(n int) string { } return string(runes) } + +func Num(n int) int { + return rand.Intn(n) +} diff --git a/web/assets/css/custom.css b/web/assets/css/custom.css index ca7d23b1..c41bcc16 100644 --- a/web/assets/css/custom.css +++ b/web/assets/css/custom.css @@ -1050,12 +1050,17 @@ li.ant-select-dropdown-menu-item:empty:after { color: rgba(255, 255, 255, 0.25); } +.ant-input-group.ant-input-group-compact-addon:not(:first-child):not( + :last-child + ), +.ant-input-group.ant-input-group-compact-wrap:not(:first-child):not( + :last-child + ), +.ant-input-group.ant-input-group-compact + > .ant-input:not(:first-child):not(:last-child), +.ant-input-number-handler, .ant-input-number-handler-wrap { - border-radius: 0; -} - -.ant-input-number-handler { - border-radius: 0; + border-radius: 0; } .ant-input-number { @@ -1089,7 +1094,8 @@ li.ant-select-dropdown-menu-item:empty:after { > td, .ant-table-thead > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) - > td { + > td, +.ant-calendar-time-picker-select li:hover { background-color: rgb(232 244 242); } @@ -1121,3 +1127,11 @@ li.ant-select-dropdown-menu-item:empty:after { .ant-input-group-addon:not(:first-child):not(:last-child), .ant-input-group-wrap:not(:first-child):not(:last-child), .ant-input-group>.ant-input:not(:first-child):not(:last-child) { border-radius: 0rem 1rem 1rem 0rem; } + +.ant-tag { + margin-right: 6px; +} + +b, strong { + font-weight: 500; +} diff --git a/web/assets/js/langs.js b/web/assets/js/langs.js index 59f0696f..42fa49ff 100644 --- a/web/assets/js/langs.js +++ b/web/assets/js/langs.js @@ -29,6 +29,11 @@ const supportLangs = [ value: 'es-ES', icon: '🇪🇸', }, + { + name: 'Indonesian', + value: 'id-ID', + icon: '🇮🇩', + }, ]; function getLang() { diff --git a/web/assets/js/model/outbound.js b/web/assets/js/model/outbound.js index dc02d91b..6a52563d 100644 --- a/web/assets/js/model/outbound.js +++ b/web/assets/js/model/outbound.js @@ -418,7 +418,7 @@ class Outbound extends CommonClass { } canEnableTls() { - if (![Protocols.VMess, Protocols.VLESS, Protocols.Trojan].includes(this.protocol)) return false; + if (![Protocols.VMess, Protocols.VLESS, Protocols.Trojan, Protocols.Shadowsocks].includes(this.protocol)) return false; return ["tcp", "ws", "http", "quic", "grpc"].includes(this.stream.network); } diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js index e9676252..d7d1fa0d 100644 --- a/web/assets/js/model/xray.js +++ b/web/assets/js/model/xray.js @@ -1534,6 +1534,28 @@ class Inbound extends XrayCommonClass { return url.toString(); } + getWireguardLink(address, port, remark, peerId) { + let txt = `[Interface]\n` + txt += `PrivateKey = ${this.settings.peers[peerId].privateKey}\n` + txt += `Address = ${this.settings.peers[peerId].allowedIPs[0]}\n` + txt += `DNS = 1.1.1.1, 1.0.0.1\n` + if (this.settings.mtu) { + txt += `MTU = ${this.settings.mtu}\n` + } + txt += `\n# ${remark}\n` + txt += `[Peer]\n` + txt += `PublicKey = ${this.settings.pubKey}\n` + txt += `AllowedIPs = 0.0.0.0/0, ::/0\n` + txt += `Endpoint = ${address}:${port}` + if (this.settings.peers[peerId].psk) { + txt += `\nPresharedKey = ${this.settings.peers[peerId].psk}` + } + if (this.settings.peers[peerId].keepAlive) { + txt += `\nPersistentKeepalive = ${this.settings.peers[peerId].keepAlive}\n` + } + return txt; + } + genLink(address='', port=this.port, forceTls='same', remark='', client) { switch (this.protocol) { case Protocols.VMESS: @@ -1557,7 +1579,7 @@ class Inbound extends XrayCommonClass { const orderChars = remarkModel.slice(1); let orders = { 'i': remark, - 'e': client ? client.email : '', + 'e': email, 'o': '', }; if(ObjectUtil.isArrEmpty(this.stream.externalProxy)){ @@ -1580,6 +1602,7 @@ class Inbound extends XrayCommonClass { } genInboundLinks(remark = '', remarkModel = '-ieo') { + let addr = !ObjectUtil.isEmpty(this.listen) && this.listen !== "0.0.0.0" ? this.listen : location.hostname; if(this.clients){ let links = []; this.clients.forEach((client) => { @@ -1589,7 +1612,14 @@ class Inbound extends XrayCommonClass { }); return links.join('\r\n'); } else { - if(this.protocol == Protocols.SHADOWSOCKS && !this.isSSMultiUser) return this.genSSLink(this.listen, this.port, 'same', remark); + if(this.protocol == Protocols.SHADOWSOCKS && !this.isSSMultiUser) return this.genSSLink(addr, this.port, 'same', remark); + if(this.protocol == Protocols.WIREGUARD) { + let links = []; + this.settings.peers.forEach((p,index) => { + links.push(this.getWireguardLink(addr,this.port,remark + remarkModel.charAt(0) + (index+1),index)); + }); + return links.join('\r\n'); + } return ''; } } @@ -2297,9 +2327,13 @@ Inbound.WireguardSettings = class extends XrayCommonClass { }; Inbound.WireguardSettings.Peer = class extends XrayCommonClass { - constructor(publicKey=Wireguard.generateKeypair().publicKey, psk='', allowedIPs=['0.0.0.0/0','::/0'], keepAlive=0) { + constructor(privateKey, publicKey, psk='', allowedIPs=['10.0.0.0/24'], keepAlive=0) { super(); + this.privateKey = privateKey this.publicKey = publicKey; + if (!this.publicKey){ + [this.publicKey, this.privateKey] = Object.values(Wireguard.generateKeypair()) + } this.psk = psk; this.allowedIPs = allowedIPs; this.keepAlive = keepAlive; @@ -2307,6 +2341,7 @@ Inbound.WireguardSettings.Peer = class extends XrayCommonClass { static fromJson(json={}){ return new Inbound.WireguardSettings.Peer( + json.privateKey, json.publicKey, json.preSharedKey, json.allowedIPs, @@ -2316,6 +2351,7 @@ Inbound.WireguardSettings.Peer = class extends XrayCommonClass { toJson() { return { + privateKey: this.privateKey, publicKey: this.publicKey, preSharedKey: this.psk.length>0 ? this.psk : undefined, allowedIPs: this.allowedIPs, diff --git a/web/assets/persian-datepicker/persian-datepicker.min.css b/web/assets/persian-datepicker/persian-datepicker.min.css index bbbef736..9e99974a 100644 --- a/web/assets/persian-datepicker/persian-datepicker.min.css +++ b/web/assets/persian-datepicker/persian-datepicker.min.css @@ -1 +1,454 @@ -jdp-overlay{height:0;width:0}jdp-container{-moz-animation:.3s cubic-bezier(.23,1,.32,1) jdpOpenAnimation;-webkit-animation:.3s cubic-bezier(.23,1,.32,1) jdpOpenAnimation;animation:.3s cubic-bezier(.23,1,.32,1) jdpOpenAnimation;background:#fff;border-radius:4px;box-shadow:0 1px 6px rgba(0,0,0,.12),0 1px 4px rgba(0,0,0,.24);direction:rtl;display:none;max-width:307.875px;min-width:307.875px;overflow:hidden;padding:.5rem 0;position:absolute;-ms-touch-action:manipulation;touch-action:manipulation;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}jdp-container,jdp-container *,jdp-container :after,jdp-container :before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}jdp-container .jdp-icon-minus,jdp-container .jdp-icon-plus{border:1px solid #e6e6e6;border-radius:4px;cursor:pointer;display:inline-block;flex:none;overflow:hidden;text-align:center;text-decoration:none;vertical-align:middle}jdp-container .jdp-icon-minus svg,jdp-container .jdp-icon-plus svg{height:1.5rem;padding:.25rem;vertical-align:middle;width:1.5rem}jdp-container .jdp-icon-minus.not-in-range,jdp-container .jdp-icon-plus.not-in-range{cursor:not-allowed}jdp-container .jdp-icon-minus.not-in-range svg,jdp-container .jdp-icon-plus.not-in-range svg{opacity:.3}jdp-container .jdp-months,jdp-container .jdp-years{fill:rgba(0,0,0,.9);color:rgba(0,0,0,.9);display:-webkit-inline-box;display:-webkit-flex;display:-ms-inline-flexbox;display:inline-flex;font-size:120%;margin:0 2.5%}jdp-container .jdp-months{width:50%}jdp-container .jdp-years{width:40%}jdp-container .jdp-month,jdp-container .jdp-month input,jdp-container .jdp-month select,jdp-container .jdp-time,jdp-container .jdp-time input,jdp-container .jdp-time select,jdp-container .jdp-year,jdp-container .jdp-year input,jdp-container .jdp-year select{background:#fff;border:none;border-radius:0;color:inherit;display:inline-block;font-family:inherit;font-size:inherit;font-weight:300;height:auto;line-height:inherit;margin:0;outline:0;padding:0;text-align:center;vertical-align:initial;width:100%}jdp-container .jdp-month input:active,jdp-container .jdp-month input:focus,jdp-container .jdp-month select:active,jdp-container .jdp-month select:focus,jdp-container .jdp-month:active,jdp-container .jdp-month:focus,jdp-container .jdp-time input:active,jdp-container .jdp-time input:focus,jdp-container .jdp-time select:active,jdp-container .jdp-time select:focus,jdp-container .jdp-time:active,jdp-container .jdp-time:focus,jdp-container .jdp-year input:active,jdp-container .jdp-year input:focus,jdp-container .jdp-year select:active,jdp-container .jdp-year select:focus,jdp-container .jdp-year:active,jdp-container .jdp-year:focus{outline:0}jdp-container .jdp-month input option,jdp-container .jdp-month option,jdp-container .jdp-month select option,jdp-container .jdp-time input option,jdp-container .jdp-time option,jdp-container .jdp-time select option,jdp-container .jdp-year input option,jdp-container .jdp-year option,jdp-container .jdp-year select option{font-size:95%;min-height:1.3rem;outline:0;padding:0}jdp-container .jdp-month:hover,jdp-container .jdp-time:hover,jdp-container .jdp-year:hover{filter:brightness(.9)}jdp-container .jdp-month input,jdp-container .jdp-time input,jdp-container .jdp-year input{-webkit-appearance:none;-moz-appearance:textfield;cursor:text}jdp-container .jdp-month input::-webkit-inner-spin-button,jdp-container .jdp-month input::-webkit-outer-spin-button,jdp-container .jdp-time input::-webkit-inner-spin-button,jdp-container .jdp-time input::-webkit-outer-spin-button,jdp-container .jdp-year input::-webkit-inner-spin-button,jdp-container .jdp-year input::-webkit-outer-spin-button{-webkit-appearance:none}jdp-container .jdp-month select,jdp-container .jdp-time select,jdp-container .jdp-year select{-webkit-appearance:menulist;-moz-appearance:menulist;cursor:pointer;position:relative}jdp-container .jdp-days{-ms-flex-pack:justify;display:inline-block;display:-ms-flexbox;display:flex;flex-wrap:wrap;-ms-flex-wrap:wrap;justify-content:space-around;outline:0;padding:.5rem 0 0;text-align:left;width:100%}jdp-container .jdp-day,jdp-container .jdp-day-name{background:0 0;border:1px solid transparent;color:rgba(0,0,0,.9);display:inline-block;flex-basis:14.2857143%;font-weight:400;height:31px;justify-content:center;line-height:31px;margin:2px 0;position:relative;text-align:center;width:14.2857143%}jdp-container .jdp-day-name.today,jdp-container .jdp-day.today{border-color:rgba(0,0,0,.3)}.dark jdp-container .jdp-day-name.selected,.dark jdp-container .jdp-day.selected,jdp-container .jdp-day-name.selected,jdp-container .jdp-day.selected{background-color:#008771!important;color:#fff!important;opacity:1!important}.dark jdp-container .jdp-day-name.holly-day,.dark jdp-container .jdp-day-name.last-week,.dark jdp-container .jdp-day.holly-day,.dark jdp-container .jdp-day.last-week,jdp-container .jdp-day-name.holly-day,jdp-container .jdp-day-name.last-week,jdp-container .jdp-day.holly-day,jdp-container .jdp-day.last-week{color:#f44336}.dark jdp-container .jdp-day.not-in-month,jdp-container .jdp-day.not-in-month{opacity:.4}jdp-container .jdp-day.disabled-day{cursor:not-allowed;opacity:.15}jdp-container .jdp-day:not(.disabled-day){border-radius:4px;cursor:pointer;transition:.1s linear}jdp-container .jdp-day:not(.disabled-day):hover{background:rgba(0,0,0,.1);transform:scale(1.15);z-index:1}jdp-container .jdp-day-name{background-color:rgba(0,0,0,.1);border-radius:0;cursor:default;font-size:90%;font-weight:900}jdp-container .jdp-footer{-ms-flex-pack:justify;display:inline-block;display:-ms-flexbox;display:flex;flex-wrap:nowrap;-ms-flex-wrap:nowrap;justify-content:space-between;outline:0;padding:.5rem .5rem 0;width:100%}jdp-container .jdp-btn-close,jdp-container .jdp-btn-empty,jdp-container .jdp-btn-today{background:#008771;border-radius:5px;color:#fff;cursor:pointer;display:inline-block;font-size:90%;font-weight:400;padding:.3em .6em;text-align:center}jdp-container .jdp-btn-close.disabled-btn,jdp-container .jdp-btn-empty.disabled-btn,jdp-container .jdp-btn-today.disabled-btn{cursor:not-allowed;opacity:.2}@media only screen and (max-width:481px){jdp-overlay{backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);background-color:rgba(0,0,0,.3);display:none;height:100%;left:0;position:fixed;top:0;width:100%}jdp-container{-moz-animation:.3s cubic-bezier(.23,1,.32,1) jdpOpenAnimationMobile;-webkit-animation:.3s cubic-bezier(.23,1,.32,1) jdpOpenAnimationMobile;animation:.3s cubic-bezier(.23,1,.32,1) jdpOpenAnimationMobile;border-radius:4px 4px 0 0;bottom:0!important;left:50%!important;max-width:100%;min-width:280px;top:unset!important;transform:translateX(-50%)!important;width:100%}jdp-container .jdp-footer{margin:.5rem 0}jdp-container .jdp-btn-close,jdp-container .jdp-btn-empty,jdp-container .jdp-btn-today{font-size:100%;padding:.5em .8em}jdp-container .jdp-btn-today~.jdp-btn-empty{margin-left:auto;margin-right:1em}}jdp-container .jdp-time-container{display:flex;padding:0}jdp-container .jdp-time-container .jdp-time{flex:auto;margin:0 .5rem;position:relative}jdp-container .jdp-time-container .jdp-time select{background:rgba(0,0,0,.03);border-radius:5px;padding:.5rem 1rem .5rem 7px}jdp-container .jdp-time-container .jdp-time:after{content:":";font-size:1.5rem;height:100%;position:absolute;right:-.7rem;top:50%;transform:translateY(-50%)}jdp-container .jdp-time-container .jdp-time:first-child:after{display:none}jdp-container .jdp-time-container.jdp-only-time .jdp-time select{font-size:1.5rem;padding:.8rem 1rem .8rem 7px}jdp-container .jdp-time-container.jdp-only-time .jdp-time:after{font-size:2.3rem;position:absolute;right:-.8rem}@-webkit-keyframes jdpOpenAnimation{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes jdpOpenAnimation{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@-webkit-keyframes jdpOpenAnimationMobile{0%{bottom:-10%;opacity:0}to{bottom:0;opacity:1}}@keyframes jdpOpenAnimationMobile{0%{margin-bottom:-20%;opacity:0}to{margin-bottom:0;opacity:1}}.dark jdp-overlay{background-color:#181f2c}.dark jdp-container{background:#181f2c;border-color:#2c3950;box-shadow:0 1px 6px rgba(255,255,255,.12),0 1px 4px rgba(255,255,255,.24);color:#fff}.dark jdp-container .jdp-icon-minus,.dark jdp-container .jdp-icon-plus{border:1px solid #ccc}.dark jdp-container .jdp-months,.dark jdp-container .jdp-years{fill:rgba(255,255,255,0.9);color:rgba(255,255,255,.9)}.dark jdp-container .jdp-month,.dark jdp-container .jdp-month input,.dark jdp-container .jdp-month select,.dark jdp-container .jdp-time,.dark jdp-container .jdp-time input,.dark jdp-container .jdp-time select,.dark jdp-container .jdp-year,.dark jdp-container .jdp-year input,.dark jdp-container .jdp-year select{background:#222d42;color:#fff}.dark jdp-container .jdp-day,.dark jdp-container .jdp-day-name{border:1px solid transparent;color:rgba(255,255,255,.9)}.dark jdp-container .jdp-day-name.today,.dark jdp-container .jdp-day.today{border-color:rgba(255,255,255,.3)}.dark jdp-container .jdp-day.disabled-day{opacity:.15}.dark jdp-container .jdp-day:not(.disabled-day):hover{background:rgba(255,255,255,.1);transform:scale(1.15);z-index:1}.dark jdp-container .jdp-day-name{background-color:#222d42}.dark jdp-container .jdp-footer{background:#181f2c}.dark jdp-container .jdp-btn-close,.dark jdp-container .jdp-btn-empty,.dark jdp-container .jdp-btn-today{background:#008771;color:#fff}.dark jdp-container .jdp-btn-close.disabled-btn,.dark jdp-container .jdp-btn-empty.disabled-btn,.dark jdp-container .jdp-btn-today.disabled-btn{opacity:.2} \ No newline at end of file +jdp-overlay { + height: 0; + width: 0; +} +jdp-container { + -moz-animation: 0.3s cubic-bezier(0.23, 1, 0.32, 1) jdpOpenAnimation; + -webkit-animation: 0.3s cubic-bezier(0.23, 1, 0.32, 1) jdpOpenAnimation; + animation: 0.3s cubic-bezier(0.23, 1, 0.32, 1) jdpOpenAnimation; + background: #fff; + border-radius: 1rem; + box-shadow: 0 2px 8px rgba(0,0,0,.15); + direction: rtl; + display: none; + width: 280px; + overflow: hidden; + padding: 0.5rem 0; + position: absolute; + -ms-touch-action: manipulation; + touch-action: manipulation; + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; + transform-origin: bottom; +} +jdp-container, +jdp-container *, +jdp-container :after, +jdp-container :before { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} +jdp-container .jdp-icon-minus, +jdp-container .jdp-icon-plus { + border: 1px solid rgb(232 244 242); + border-radius: 6px; + cursor: pointer; + display: flex; + flex: none; + overflow: hidden; + text-align: center; + text-decoration: none; + vertical-align: middle; + transition: all 0.2s; + width: 24px; + height: 24px; + align-items: center; + justify-content: center; +} + +jdp-container .jdp-icon-minus:hover, +jdp-container .jdp-icon-plus:hover { + background-color: rgb(232 244 242); +} + +jdp-container .jdp-icon-minus svg, +jdp-container .jdp-icon-plus svg { + height: 1.5rem; + padding: 0.25rem; + vertical-align: middle; + width: 1.5rem; +} +jdp-container .jdp-icon-minus.not-in-range, +jdp-container .jdp-icon-plus.not-in-range { + cursor: not-allowed; +} +jdp-container .jdp-icon-minus.not-in-range svg, +jdp-container .jdp-icon-plus.not-in-range svg { + opacity: 0.3; +} +jdp-container .jdp-months, +jdp-container .jdp-years { + fill: rgba(0, 0, 0, 0.9); + color: rgba(0, 0, 0, 0.9); + display: -webkit-inline-box; + display: -webkit-flex; + display: -ms-inline-flexbox; + display: inline-flex; + font-size: 120%; + margin: 0 2.5%; +} +jdp-container .jdp-months { + width: 40%; + margin-right: 1rem; +} +jdp-container .jdp-years { + width: 40%; + margin: 0.5rem 1.2rem 0.8rem 0; +} +jdp-container .jdp-month, +jdp-container .jdp-month input, +jdp-container .jdp-month select, +jdp-container .jdp-time, +jdp-container .jdp-time input, +jdp-container .jdp-time select, +jdp-container .jdp-year, +jdp-container .jdp-year input, +jdp-container .jdp-year select { + background: #fff; + border: none; + border-radius: 0; + color: inherit; + display: inline-block; + font-family: inherit; + font-size: inherit; + font-weight: 300; + height: auto; + line-height: inherit; + margin: 0; + outline: 0; + padding: 0; + text-align: center; + vertical-align: initial; + width: 100%; + font-feature-settings: "ss01"; +} +jdp-container .jdp-month input:active, +jdp-container .jdp-month input:focus, +jdp-container .jdp-month select:active, +jdp-container .jdp-month select:focus, +jdp-container .jdp-month:active, +jdp-container .jdp-month:focus, +jdp-container .jdp-time input:active, +jdp-container .jdp-time input:focus, +jdp-container .jdp-time select:active, +jdp-container .jdp-time select:focus, +jdp-container .jdp-time:active, +jdp-container .jdp-time:focus, +jdp-container .jdp-year input:active, +jdp-container .jdp-year input:focus, +jdp-container .jdp-year select:active, +jdp-container .jdp-year select:focus, +jdp-container .jdp-year:active, +jdp-container .jdp-year:focus { + outline: 0; +} +jdp-container .jdp-month input option, +jdp-container .jdp-month option, +jdp-container .jdp-month select option, +jdp-container .jdp-time input option, +jdp-container .jdp-time option, +jdp-container .jdp-time select option, +jdp-container .jdp-year input option, +jdp-container .jdp-year option, +jdp-container .jdp-year select option { + font-size: 95%; + min-height: 1.3rem; + outline: 0; + padding: 0; +} +jdp-container .jdp-month input, +jdp-container .jdp-time input, +jdp-container .jdp-year input { + -webkit-appearance: none; + -moz-appearance: textfield; + cursor: text; +} +jdp-container .jdp-month input::-webkit-inner-spin-button, +jdp-container .jdp-month input::-webkit-outer-spin-button, +jdp-container .jdp-time input::-webkit-inner-spin-button, +jdp-container .jdp-time input::-webkit-outer-spin-button, +jdp-container .jdp-year input::-webkit-inner-spin-button, +jdp-container .jdp-year input::-webkit-outer-spin-button { + -webkit-appearance: none; +} +jdp-container .jdp-month select, +jdp-container .jdp-time select, +jdp-container .jdp-year select { + -webkit-appearance: none; + -moz-appearance: none; + cursor: pointer; + appearance: none; + position: relative; +} +jdp-container .jdp-days { + -ms-flex-pack: justify; + display: inline-block; + display: -ms-flexbox; + display: flex; + flex-wrap: wrap; + -ms-flex-wrap: wrap; + justify-content: space-around; + outline: 0; + padding: 8px 12px; + text-align: left; + width: 100%; + border-top: 1px solid #e8e8e8; +} +jdp-container .jdp-day, +jdp-container .jdp-day-name { + background: 0 0; + border: 1px solid transparent; + color: rgba(0,0,0,.65); + display: block; + font-weight: 400; + height: 24px; + justify-content: center; + line-height: 22px; + margin: 2px 6px; + position: relative; + text-align: center; + width: 24px; + font-feature-settings: "ss01"; +} +jdp-container .jdp-day-name.today, +jdp-container .jdp-day.today { + border-color: #008771; + color: #008771; + font-weight: 700; +} +.dark jdp-container .jdp-day-name.selected, +.dark jdp-container .jdp-day.selected, +jdp-container .jdp-day-name.selected, +jdp-container .jdp-day.selected { + background-color: #008771 !important; + color: #fff !important; + opacity: 1 !important; +} +.dark jdp-container .jdp-day-name.holly-day, +.dark jdp-container .jdp-day-name.last-week, +.dark jdp-container .jdp-day.holly-day, +.dark jdp-container .jdp-day.last-week, +jdp-container .jdp-day-name.holly-day, +jdp-container .jdp-day-name.last-week, +jdp-container .jdp-day.holly-day, +jdp-container .jdp-day.last-week { + color: #f44336; +} +.dark jdp-container .jdp-day.not-in-month, +jdp-container .jdp-day.not-in-month { + opacity: 0.4; +} +jdp-container .jdp-day.disabled-day { + cursor: not-allowed; + opacity: 0.15; +} +jdp-container .jdp-day:not(.disabled-day) { + border-radius: 6px; + cursor: pointer; + transition: 0.1s linear; +} +jdp-container .jdp-day:not(.disabled-day):hover { + background: rgb(232 244 242); +} +jdp-container .jdp-day-name { + background-color: rgb(0 0 0 / 0%); + border-radius: 6px; + cursor: default; +} +jdp-container .jdp-footer { + -ms-flex-pack: justify; + display: inline-block; + display: -ms-flexbox; + display: flex; + flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + justify-content: space-between; + outline: 0; + padding: 6px 12px 0; + width: 100%; + border-top: 1px solid #e8e8e8; +} +jdp-container .jdp-btn-close, +jdp-container .jdp-btn-empty, +jdp-container .jdp-btn-today { + background: #00877000; + border-radius: 5px; + color: #008771; + cursor: pointer; + display: inline-block; + font-size: 90%; + font-weight: 400; + padding: 0.3em 0.6em; + text-align: center; +} +jdp-container .jdp-btn-close.disabled-btn, +jdp-container .jdp-btn-empty.disabled-btn, +jdp-container .jdp-btn-today.disabled-btn { + cursor: not-allowed; + opacity: 0.2; +} +jdp-container .jdp-time-container { + display: flex; + padding: 6px 12px 12px 12px; +} +jdp-container .jdp-time-container .jdp-time { + flex: auto; + margin: 0 0.5rem; + position: relative; +} +jdp-container .jdp-time-container .jdp-time select { + border: 1px solid rgb(232 244 242); + border-radius: 6px; + appearance: none; + transition: all 0.2s; +} + +jdp-container .jdp-time-container .jdp-time select:hover { + background-color: rgb(232 244 242); +} + +jdp-container .jdp-time-container .jdp-time:after { + content: ":"; + font-size: 1.5rem; + height: 100%; + position: absolute; + right: -0.7rem; + transform: translateY(-50%); +} +jdp-container .jdp-time-container .jdp-time:first-child:after { + display: none; +} +jdp-container .jdp-time-container.jdp-only-time .jdp-time select { + font-size: 1.5rem; + padding: 0.8rem 1rem 0.8rem 7px; +} +jdp-container .jdp-time-container.jdp-only-time .jdp-time:after { + font-size: 2.3rem; + position: absolute; + right: -0.8rem; +} +@-webkit-keyframes jdpOpenAnimation { + 0% { + transform: scaleY(.8); + transform-origin: 0% 0%; + opacity: 0 + } + + to { + transform: scaleY(1); + transform-origin: 0% 0%; + opacity: 1 + } +} +@keyframes jdpOpenAnimation { + 0% { + transform: scaleY(.8); + transform-origin: 0% 0%; + opacity: 0 + } + + to { + transform: scaleY(1); + transform-origin: 0% 0%; + opacity: 1 + } +} +@-webkit-keyframes jdpOpenAnimationMobile { + 0% { + bottom: -10%; + opacity: 0; + } + to { + bottom: 0; + opacity: 1; + } +} +@keyframes jdpOpenAnimationMobile { + 0% { + margin-bottom: -20%; + opacity: 0; + } + to { + margin-bottom: 0; + opacity: 1; + } +} + +.dark jdp-container .jdp-days { + border-color: #313f5a; +} + +.dark jdp-overlay { + background-color: #181f2c; +} +.dark jdp-container { + background: #101828; + border-color: #2c3950; + box-shadow: 0 2px 8px rgba(0,0,0,.15); + color: #fff; +} +.dark jdp-container .jdp-icon-minus, +.dark jdp-container .jdp-icon-plus { + border-color: #313f5a; +} + +.dark jdp-container .jdp-icon-minus:hover, +.dark jdp-container .jdp-icon-plus:hover { + background-color: #313f5a; +} + +.dark jdp-container .jdp-months, +.dark jdp-container .jdp-years { + fill: rgba(255, 255, 255, 0.9); + color: rgba(255, 255, 255, 0.9); +} +.dark jdp-container .jdp-month, +.dark jdp-container .jdp-month input, +.dark jdp-container .jdp-month select, +.dark jdp-container .jdp-time, +.dark jdp-container .jdp-time input, +.dark jdp-container .jdp-time select, +.dark jdp-container .jdp-year, +.dark jdp-container .jdp-year input, +.dark jdp-container .jdp-year select { + background: #101828; + color: rgb(255 255 255 / 65%); +} +.dark jdp-container .jdp-day, +.dark jdp-container .jdp-day-name { + border: 1px solid transparent; + color: rgba(255, 255, 255, 0.65); +} +.dark jdp-container .jdp-day-name.today, +.dark jdp-container .jdp-day.today { + border-color: #008771; +} +.dark jdp-container .jdp-day.disabled-day { + opacity: 0.15; +} +.dark jdp-container .jdp-day:not(.disabled-day):hover { + background-color: #313f5a; + color: #fff; +} +.dark jdp-container .jdp-footer { + border-color: #313f5a; +} +.dark jdp-container .jdp-btn-close, +.dark jdp-container .jdp-btn-empty, +.dark jdp-container .jdp-btn-today { + color: rgb(255 255 255 / 65%); +} + +.dark jdp-container .jdp-btn-close:hover, +.dark jdp-container .jdp-btn-empty:hover, +.dark jdp-container .jdp-btn-today:hover { + color: rgb(255, 255, 255); +} + +.dark jdp-container .jdp-btn-close.disabled-btn, +.dark jdp-container .jdp-btn-empty.disabled-btn, +.dark jdp-container .jdp-btn-today.disabled-btn { + opacity: 0.2; +} + +.dark jdp-container .jdp-time-container .jdp-time select:hover { + background-color: #313f5a; + color: #fff; +} + +.dark jdp-container .jdp-time-container .jdp-time select { + border: 1px solid rgb(49 63 90); +} diff --git a/web/controller/xray_setting.go b/web/controller/xray_setting.go index 430cc77b..28f55b54 100644 --- a/web/controller/xray_setting.go +++ b/web/controller/xray_setting.go @@ -29,6 +29,7 @@ func (a *XraySettingController) initRouter(g *gin.RouterGroup) { g.GET("/getDefaultJsonConfig", a.getDefaultXrayConfig) g.POST("/warp/:action", a.warp) g.GET("/getOutboundsTraffic", a.getOutboundsTraffic) + g.POST("/resetOutboundsTraffic", a.resetOutboundsTraffic) } func (a *XraySettingController) getXraySetting(c *gin.Context) { @@ -95,3 +96,13 @@ func (a *XraySettingController) getOutboundsTraffic(c *gin.Context) { } jsonObj(c, outboundsTraffic, nil) } + +func (a *XraySettingController) resetOutboundsTraffic(c *gin.Context) { + tag := c.PostForm("tag") + err := a.OutboundService.ResetOutboundTraffic(tag) + if err != nil { + jsonMsg(c, "Error in reset outbound traffics", err) + return + } + jsonObj(c, "", nil) +} diff --git a/web/html/common/qrcode_modal.html b/web/html/common/qrcode_modal.html index 3c4fd929..3bda4c29 100644 --- a/web/html/common/qrcode_modal.html +++ b/web/html/common/qrcode_modal.html @@ -35,12 +35,21 @@ this.client = client; this.subId = ''; this.qrcodes = []; - this.inbound.genAllLinks(this.dbInbound.remark, app.remarkModel, client).forEach(l => { - this.qrcodes.push({ - remark: l.remark, - link: l.link + if (this.inbound.protocol == Protocols.WIREGUARD){ + this.inbound.genInboundLinks(dbInbound.remark).split('\r\n').forEach((l,index) =>{ + this.qrcodes.push({ + remark: "Peer " + (index+1), + link: l + }); }); - }); + } else { + this.inbound.genAllLinks(this.dbInbound.remark, app.remarkModel, client).forEach(l => { + this.qrcodes.push({ + remark: l.remark, + link: l.link + }); + }); + } this.visible = true; }, close: function () { diff --git a/web/html/login.html b/web/html/login.html index 34eff41c..b622a080 100644 --- a/web/html/login.html +++ b/web/html/login.html @@ -31,7 +31,7 @@ } .title { font-size: 32px; - font-weight: bold; + font-weight: 600; } #app { overflow: hidden; @@ -204,7 +204,7 @@ position: relative; width: 100%; height: 15vh; - margin-bottom: -5px; /*Fix for safari gap*/ + margin-bottom: -8px; /*Fix for safari gap*/ min-height: 100px; max-height: 150px; } @@ -212,23 +212,27 @@ animation: move-forever 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite; } .dark .parallax > use { - fill: rgb(10 117 87 / 20%); + fill: #0f2d32; } .parallax > use:nth-child(1) { animation-delay: -2s; - animation-duration: 7s; + animation-duration: 4s; opacity: 0.2; } .parallax > use:nth-child(2) { animation-delay: -3s; - animation-duration: 10s; + animation-duration: 7s; opacity: 0.4; } .parallax > use:nth-child(3) { animation-delay: -4s; - animation-duration: 13s; + animation-duration: 10s; opacity: 0.6; } + .parallax > use:nth-child(4) { + animation-delay: -5s; + animation-duration: 13s; + } @keyframes move-forever { 0% { transform: translate3d(-90px, 0, 0); @@ -255,9 +259,10 @@ + - + @@ -290,7 +295,7 @@ -
+
diff --git a/web/html/xui/common_sider.html b/web/html/xui/common_sider.html index f91b9fbb..13d5bd49 100644 --- a/web/html/xui/common_sider.html +++ b/web/html/xui/common_sider.html @@ -1,19 +1,19 @@ {{define "menuItems"}} - {{ i18n "menu.dashboard"}} + {{ i18n "menu.dashboard"}} - {{ i18n "menu.inbounds"}} + {{ i18n "menu.inbounds"}} - {{ i18n "menu.settings"}} + {{ i18n "menu.settings"}} - {{ i18n "menu.xray"}} + {{ i18n "menu.xray"}} @@ -21,7 +21,7 @@ - {{ i18n "menu.logout"}} + {{ i18n "menu.logout"}} {{end}} diff --git a/web/html/xui/component/persianDatepicker.html b/web/html/xui/component/persianDatepicker.html index 10ef8472..456d5ec6 100644 --- a/web/html/xui/component/persianDatepicker.html +++ b/web/html/xui/component/persianDatepicker.html @@ -5,7 +5,7 @@ @input="$emit('input', convertToGregorian($event.target.value)); jalaliDatepicker.hide();" :placeholder="placeholder">
@@ -57,4 +57,4 @@ } }); -{{end}} \ No newline at end of file +{{end}} diff --git a/web/html/xui/form/inbound.html b/web/html/xui/form/inbound.html index 048fc818..6f3705ff 100644 --- a/web/html/xui/form/inbound.html +++ b/web/html/xui/form/inbound.html @@ -54,7 +54,7 @@ - {{template "form/sniffing"}} -{{end}} \ No newline at end of file +{{end}} diff --git a/web/html/xui/form/outbound.html b/web/html/xui/form/outbound.html index 3f11907d..469c42b9 100644 --- a/web/html/xui/form/outbound.html +++ b/web/html/xui/form/outbound.html @@ -134,28 +134,10 @@ - - + - - + @@ -189,7 +171,6 @@ - - - - @@ -363,13 +349,15 @@ - + None [[ key ]] - [[ alpn ]] @@ -381,11 +369,12 @@ + + + + @@ -51,7 +57,7 @@ {{ i18n "reset" }} {{ i18n "pages.xray.wireguard.psk" }} - + diff --git a/web/html/xui/form/stream/external_proxy.html b/web/html/xui/form/stream/external_proxy.html index 2a072df9..9c3ed2e0 100644 --- a/web/html/xui/form/stream/external_proxy.html +++ b/web/html/xui/form/stream/external_proxy.html @@ -20,7 +20,7 @@ - - + - {{end}} diff --git a/web/html/xui/form/stream/stream_tcp.html b/web/html/xui/form/stream/stream_tcp.html index 19a09ac3..8576df8c 100644 --- a/web/html/xui/form/stream/stream_tcp.html +++ b/web/html/xui/form/stream/stream_tcp.html @@ -33,7 +33,7 @@ - + + + @@ -79,4 +79,4 @@ -{{end}} \ No newline at end of file +{{end}} diff --git a/web/html/xui/form/stream/stream_ws.html b/web/html/xui/form/stream/stream_ws.html index 00b64167..62380e94 100644 --- a/web/html/xui/form/stream/stream_ws.html +++ b/web/html/xui/form/stream/stream_ws.html @@ -7,7 +7,7 @@ - + + + diff --git a/web/html/xui/inbound_info_modal.html b/web/html/xui/inbound_info_modal.html index cdcabad9..23f8bd47 100644 --- a/web/html/xui/inbound_info_modal.html +++ b/web/html/xui/inbound_info_modal.html @@ -179,10 +179,10 @@ @@ -319,7 +345,6 @@ index: null, isExpired: false, subLink: '', - tgLink: '', show(dbInbound, index) { this.index = index; this.inbound = dbInbound.toInbound(); @@ -327,14 +352,15 @@ this.clientSettings = this.inbound.clients ? this.inbound.clients[index] : null; this.isExpired = this.inbound.clients ? this.inbound.isExpiry(index): this.dbInbound.isExpiry; this.clientStats = this.inbound.clients ? this.dbInbound.clientStats.find(row => row.email === this.clientSettings.email) : []; - this.links = this.inbound.genAllLinks(this.dbInbound.remark, app.remarkModel, this.clientSettings); + if (this.inbound.protocol == Protocols.WIREGUARD){ + this.links = this.inbound.genInboundLinks(dbInbound.remark).split('\r\n') + } else { + this.links = this.inbound.genAllLinks(this.dbInbound.remark, app.remarkModel, this.clientSettings); + } if (this.clientSettings) { if (this.clientSettings.subId) { this.subLink = this.genSubLink(this.clientSettings.subId); } - if (this.clientSettings.tgId) { - this.tgLink = "https://t.me/" + this.clientSettings.tgId; - } } this.visible = true; }, diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html index c986e3fd..93f25730 100644 --- a/web/html/xui/inbounds.html +++ b/web/html/xui/inbounds.html @@ -133,6 +133,10 @@ {{ i18n "pages.inbounds.export" }} + + + {{ i18n "pages.inbounds.export" }} - {{ i18n "pages.settings.subSettings" }} + {{ i18n "pages.inbounds.resetAllTraffic" }} @@ -141,7 +145,7 @@ {{ i18n "pages.inbounds.resetAllClientTraffics" }} - + {{ i18n "pages.inbounds.delDepletedClients" }} @@ -196,7 +200,7 @@ {{ i18n "edit" }} - + {{ i18n "qrCode" }} @@ -217,7 +221,11 @@ {{ i18n "pages.inbounds.export"}} - + + + {{ i18n "pages.inbounds.export"}} - {{ i18n "pages.settings.subSettings" }} + + {{ i18n "pages.inbounds.delDepletedClients" }} @@ -578,6 +586,7 @@ this.refreshing = false; return; } + await this.getOnlineUsers(); this.setInbounds(msg.obj); setTimeout(() => { @@ -642,8 +651,12 @@ clientCount = clients.length; if (dbInbound.enable) { clients.forEach(client => { - client.enable ? active.push(client.email) : deactive.push(client.email); - if(this.isClientOnline(client.email)) online.push(client.email); + if (client.enable && this.isClientOnline(client.email)) { + active.push(client.email); + online.push(client.email); + } else { + deactive.push(client.email); + } }); clientStats.forEach(client => { if (!client.enable) { @@ -668,6 +681,7 @@ online: online, }; }, + searchInbounds(key) { if (ObjectUtil.isEmpty(key)) { this.searchedInbounds = this.dbInbounds.slice(); @@ -731,6 +745,9 @@ case "export": this.exportAllLinks(); break; + case "subs": + this.exportAllSubs(); + break; case "resetInbounds": this.resetAllTraffic(); break; @@ -762,6 +779,9 @@ case "export": this.inboundLinks(dbInbound.id); break; + case "subs": + this.exportSubs(dbInbound.id); + break; case "clipboard": this.copyToClipboard(dbInbound.id); break; @@ -1186,6 +1206,22 @@ newDbInbound = this.checkFallback(dbInbound); txtModal.show('{{ i18n "pages.inbounds.export"}}', newDbInbound.genInboundLinks(), newDbInbound.remark); }, + exportSubs(dbInboundId) { + const dbInbound = this.dbInbounds.find(row => row.id === dbInboundId); + const clients = this.getInboundClients(dbInbound); + let subLinks = [] + if (clients != null){ + clients.forEach(c => { + if (c.subId && c.subId.length>0){ + subLinks.push(this.subSettings.subURI + c.subId + "?name=" + c.subId) + } + }) + } + txtModal.show( + '{{ i18n "pages.inbounds.export"}} - {{ i18n "pages.settings.subSettings" }}', + [...new Set(subLinks)].join('\n'), + dbInbound.remark + "-Subs"); + }, importInbound() { promptModal.open({ title: '{{ i18n "pages.inbounds.importInbound" }}', @@ -1198,6 +1234,23 @@ }, }); }, + exportAllSubs() { + let subLinks = [] + for (const dbInbound of this.dbInbounds) { + const clients = this.getInboundClients(dbInbound); + if (clients != null){ + clients.forEach(c => { + if (c.subId && c.subId.length>0){ + subLinks.push(this.subSettings.subURI + c.subId + "?name=" + c.subId) + } + }) + } + } + txtModal.show( + '{{ i18n "pages.inbounds.export"}} - {{ i18n "pages.settings.subSettings" }}', + [...new Set(subLinks)].join('\r\n'), + 'All-Inbounds-Subs'); + }, exportAllLinks() { let copyText = []; for (const dbInbound of this.dbInbounds) { diff --git a/web/html/xui/index.html b/web/html/xui/index.html index 258d4154..abd3b8d0 100644 --- a/web/html/xui/index.html +++ b/web/html/xui/index.html @@ -18,6 +18,14 @@ .ant-card-dark h2 { color: hsla(0, 0%, 100%, .65); } + + .ant-tag-df { + color: rgb(0 0 0 / 80%); + } + + .dark .ant-tag-df { + color: rgb(255 255 255 / 80%); + } @@ -36,15 +44,15 @@ -
CPU: [[ cpuCoreFormat(status.cpuCores) ]]
-
Speed: [[ cpuSpeedFormat(status.cpuSpeedMhz) ]]
+
CPU: [[ cpuCoreFormat(status.cpuCores) ]]
+
Speed: [[ cpuSpeedFormat(status.cpuSpeedMhz) ]]
- {{ i18n "pages.index.memory"}}: [[ sizeFormat(status.mem.current) ]] / [[ sizeFormat(status.mem.total) ]] + {{ i18n "pages.index.memory"}}: [[ sizeFormat(status.mem.current) ]] / [[ sizeFormat(status.mem.total) ]]
@@ -56,7 +64,7 @@ :stroke-color="status.swap.color" :percent="status.swap.percent">
- Swap: [[ sizeFormat(status.swap.current) ]] / [[ sizeFormat(status.swap.total) ]] + Swap: [[ sizeFormat(status.swap.current) ]] / [[ sizeFormat(status.swap.total) ]]
@@ -64,7 +72,7 @@ :stroke-color="status.disk.color" :percent="status.disk.percent">
- {{ i18n "pages.index.hard"}}: [[ sizeFormat(status.disk.current) ]] / [[ sizeFormat(status.disk.total) ]] + {{ i18n "pages.index.hard"}}: [[ sizeFormat(status.disk.current) ]] / [[ sizeFormat(status.disk.total) ]]
@@ -75,25 +83,25 @@ - + - 3X-UI v{{ .cur_ver }} - Xray v[[ status.xray.version ]] - @panel3xui + 3X-UI: + v{{ .cur_ver }} + @Panel3xui - + - {{ i18n "menu.link" }}: - {{ i18n "pages.index.logs" }} - {{ i18n "pages.index.config" }} - {{ i18n "pages.index.backup" }} + {{ i18n "pages.index.operationHours" }}: + Xray [[ formatSecond(status.appStats.uptime) ]] + OS [[ formatSecond(status.uptime) ]] - + - {{ i18n "pages.index.xrayStatus" }}: - [[ status.xray.state ]] + {{ i18n "pages.index.xrayStatus" }}: + [[ status.xray.state ]] + An error occurred while running Xray @@ -106,137 +114,143 @@ {{ i18n "pages.index.stopXray" }} {{ i18n "pages.index.restartXray" }} - {{ i18n "pages.index.xraySwitch" }} + v[[ status.xray.version ]] - + - {{ i18n "pages.index.operationHours" }}: - Xray - [[ formatSecond(status.appStats.uptime) ]] - OS - [[ formatSecond(status.uptime) ]] + {{ i18n "menu.link" }}: + {{ i18n "pages.index.logs" }} + {{ i18n "pages.index.config" }} + {{ i18n "pages.index.backup" }} - + - {{ i18n "pages.index.systemLoad" }}: [[ status.loads[0] ]] | [[ status.loads[1] ]] | [[ status.loads[2] ]] + {{ i18n "pages.index.systemLoad" }}: + + [[ status.loads[0] ]] | [[ status.loads[1] ]] | [[ status.loads[2] ]] - + - + - {{ i18n "usage"}}: - RAM [[ sizeFormat(status.appStats.mem) ]] - - Threads [[ status.appStats.threads ]] - + {{ i18n "usage"}}: + + RAM [[ sizeFormat(status.appStats.mem) ]] + + + Threads [[ status.appStats.threads ]] + - + - - IPv4: + + IPv4 - - - - - IPv6: + + + + + IPv6 - + - + - - TCP: [[ status.tcpCount ]] + + TCP: [[ status.tcpCount ]] - + - - UDP: [[ status.udpCount ]] + + UDP: [[ status.udpCount ]] - + - + - - [[ sizeFormat(status.netIO.up) ]]/s + + + Up: [[ sizeFormat(status.netIO.up) ]]/s - + - - [[ sizeFormat(status.netIO.down) ]]/s + + + Down: [[ sizeFormat(status.netIO.down) ]]/s - + - + - - [[ sizeFormat(status.netTraffic.sent) ]] + + - + Out: [[ sizeFormat(status.netTraffic.sent) ]] + - - [[ sizeFormat(status.netTraffic.recv) ]] + + - + In: [[ sizeFormat(status.netTraffic.recv) ]] + @@ -256,7 +270,7 @@ > @@ -440,8 +454,8 @@ loading: false, show(logs) { this.visible = true; - this.logs = logs; - this.formattedLogs = logs.length > 0 ? this.formatLogs(logs) : "No Record..."; + this.logs = logs || []; + this.formattedLogs = this.logs.length > 0 ? this.formatLogs(this.logs) : "No Record..."; }, formatLogs(logs) { let formattedLogs = ''; diff --git a/web/html/xui/settings.html b/web/html/xui/settings.html index 0acbbfec..533553c5 100644 --- a/web/html/xui/settings.html +++ b/web/html/xui/settings.html @@ -76,15 +76,15 @@ - - - + + + {{ i18n "pages.settings.save" }} {{ i18n "pages.settings.restartPanel" }} - +