├── .editorconfig
├── .env.example
├── .gitattributes
├── .gitignore
├── README.md
├── Xray
├── .gitignore
├── bin
│ ├── Win-64
│ │ ├── geoip.dat
│ │ ├── geosite.dat
│ │ └── xray.exe
│ ├── config.json
│ ├── ips.csv
│ ├── linux-64
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── geoip.dat
│ │ ├── geosite.dat
│ │ └── xray
│ └── linux-arm64
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── geoip.dat
│ │ ├── geosite.dat
│ │ └── xray
└── temp
│ └── .gitignore
├── app
├── Console
│ ├── Commands
│ │ ├── HelloWorldCommand.php
│ │ ├── ProcessIpCommand.php
│ │ └── RunDnsUpdate.php
│ └── Kernel.php
├── Exceptions
│ └── Handler.php
├── Filament
│ ├── Resources
│ │ ├── OwnerResource.php
│ │ ├── OwnerResource
│ │ │ └── Pages
│ │ │ │ ├── CreateOwner.php
│ │ │ │ ├── EditOwner.php
│ │ │ │ └── ListOwners.php
│ │ ├── ProjectResource.php
│ │ ├── ProjectResource
│ │ │ └── Pages
│ │ │ │ ├── CreateProject.php
│ │ │ │ ├── EditProject.php
│ │ │ │ └── ListProjects.php
│ │ ├── ServerResource.php
│ │ ├── ServerResource
│ │ │ └── Pages
│ │ │ │ ├── CreateServer.php
│ │ │ │ ├── EditServer.php
│ │ │ │ └── ListServers.php
│ │ ├── UserResource.php
│ │ ├── UserResource.php.old
│ │ └── UserResource
│ │ │ └── Pages
│ │ │ ├── CreateUser.php
│ │ │ ├── EditUser.php
│ │ │ └── ListUsers.php
│ └── Widgets
│ │ └── ServersUsage.php
├── Http
│ ├── Controllers
│ │ ├── Controller.php
│ │ └── TelegramWebhookController.php
│ ├── Kernel.php
│ └── Middleware
│ │ ├── Authenticate.php
│ │ ├── EncryptCookies.php
│ │ ├── PreventRequestsDuringMaintenance.php
│ │ ├── RedirectIfAuthenticated.php
│ │ ├── TrimStrings.php
│ │ ├── TrustHosts.php
│ │ ├── TrustProxies.php
│ │ ├── ValidateSignature.php
│ │ └── VerifyCsrfToken.php
├── Jobs
│ ├── HandleTelegramMessage.php
│ └── ProcessIpsJob.php
├── Models
│ ├── Owner.php
│ ├── Project.php
│ ├── Server.php
│ ├── Usage.php
│ └── User.php
├── Policies
│ └── ServerPolicy.php
├── Providers
│ ├── AppServiceProvider.php
│ ├── AuthServiceProvider.php
│ ├── BroadcastServiceProvider.php
│ ├── EventServiceProvider.php
│ ├── Filament
│ │ └── AdminPanelProvider.php
│ └── RouteServiceProvider.php
└── Services
│ ├── CloudflareApiService.php
│ ├── DnsUpdateService.php
│ └── SubHelper.php
├── artisan
├── bootstrap
├── app.php
└── cache
│ └── .gitignore
├── composer.json
├── composer.lock
├── config
├── app.php
├── auth.php
├── broadcasting.php
├── cache.php
├── cors.php
├── database.php
├── filesystems.php
├── hashing.php
├── logging.php
├── mail.php
├── queue.php
├── sanctum.php
├── services.php
├── session.php
├── telegram.php
└── view.php
├── database
├── .gitignore
├── factories
│ └── UserFactory.php
├── migrations
│ ├── 2014_10_12_000000_create_users_table.php
│ ├── 2014_10_12_100000_create_password_reset_tokens_table.php
│ ├── 2019_08_19_000000_create_failed_jobs_table.php
│ ├── 2019_12_14_000001_create_personal_access_tokens_table.php
│ ├── 2024_02_03_194652_create_owners_table.php
│ ├── 2024_02_03_195020_create_projects_table.php
│ ├── 2024_02_04_194511_create_servers_table.php
│ ├── 2024_02_05_215029_add_inbound_stat_to_servers.php
│ ├── 2024_03_04_231834_create_usage_table.php
│ ├── 2024_03_29_181839_add_status_to_servers_table.php
│ └── 2024_09_18_194426_create_jobs_table.php
└── seeders
│ └── DatabaseSeeder.php
├── package.json
├── phpunit.xml
├── public
├── .htaccess
├── css
│ └── filament
│ │ ├── filament
│ │ └── app.css
│ │ ├── forms
│ │ └── forms.css
│ │ └── support
│ │ └── support.css
├── favicon.ico
├── index.php
├── js
│ └── filament
│ │ ├── filament
│ │ ├── app.js
│ │ └── echo.js
│ │ ├── forms
│ │ └── components
│ │ │ ├── color-picker.js
│ │ │ ├── date-time-picker.js
│ │ │ ├── file-upload.js
│ │ │ ├── key-value.js
│ │ │ ├── markdown-editor.js
│ │ │ ├── rich-editor.js
│ │ │ ├── select.js
│ │ │ ├── tags-input.js
│ │ │ └── textarea.js
│ │ ├── notifications
│ │ └── notifications.js
│ │ ├── support
│ │ ├── async-alpine.js
│ │ └── support.js
│ │ ├── tables
│ │ └── components
│ │ │ └── table.js
│ │ └── widgets
│ │ └── components
│ │ ├── chart.js
│ │ └── stats-overview
│ │ └── stat
│ │ └── chart.js
├── robots.txt
└── xray.jpg
├── resources
├── css
│ └── app.css
├── js
│ ├── app.js
│ └── bootstrap.js
└── views
│ └── welcome.blade.php
├── routes
├── api.php
├── channels.php
├── console.php
└── web.php
├── storage
├── SampleBPB.json
├── app
│ ├── .gitignore
│ └── public
│ │ └── .gitignore
├── framework
│ ├── .gitignore
│ ├── cache
│ │ ├── .gitignore
│ │ └── data
│ │ │ └── .gitignore
│ ├── sessions
│ │ └── .gitignore
│ ├── testing
│ │ └── .gitignore
│ └── views
│ │ └── .gitignore
├── leastSample-IranDir.json
├── logs
│ └── .gitignore
└── magic.json
├── tests
├── CreatesApplication.php
├── Feature
│ └── ExampleTest.php
├── TestCase.php
└── Unit
│ └── ExampleTest.php
└── vite.config.js
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | end_of_line = lf
6 | indent_size = 4
7 | indent_style = space
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | trim_trailing_whitespace = false
13 |
14 | [*.{yml,yaml}]
15 | indent_size = 2
16 |
17 | [docker-compose.yml]
18 | indent_size = 4
19 |
--------------------------------------------------------------------------------
/.env.example:
--------------------------------------------------------------------------------
1 | APP_NAME=Laravel
2 | APP_ENV=local
3 | APP_KEY=
4 | APP_DEBUG=true
5 | APP_URL=http://localhost
6 |
7 | LOG_CHANNEL=stack
8 | LOG_DEPRECATIONS_CHANNEL=null
9 | LOG_LEVEL=debug
10 |
11 | DB_CONNECTION=mysql
12 | DB_HOST=127.0.0.1
13 | DB_PORT=3306
14 | DB_DATABASE=laravel
15 | DB_USERNAME=root
16 | DB_PASSWORD=
17 |
18 | BROADCAST_DRIVER=log
19 | CACHE_DRIVER=file
20 | FILESYSTEM_DISK=local
21 | QUEUE_CONNECTION=sync
22 | SESSION_DRIVER=file
23 | SESSION_LIFETIME=120
24 |
25 | MEMCACHED_HOST=127.0.0.1
26 |
27 | REDIS_HOST=127.0.0.1
28 | REDIS_PASSWORD=null
29 | REDIS_PORT=6379
30 |
31 | MAIL_MAILER=smtp
32 | MAIL_HOST=mailpit
33 | MAIL_PORT=1025
34 | MAIL_USERNAME=null
35 | MAIL_PASSWORD=null
36 | MAIL_ENCRYPTION=null
37 | MAIL_FROM_ADDRESS="hello@example.com"
38 | MAIL_FROM_NAME="${APP_NAME}"
39 |
40 | AWS_ACCESS_KEY_ID=
41 | AWS_SECRET_ACCESS_KEY=
42 | AWS_DEFAULT_REGION=us-east-1
43 | AWS_BUCKET=
44 | AWS_USE_PATH_STYLE_ENDPOINT=false
45 |
46 | PUSHER_APP_ID=
47 | PUSHER_APP_KEY=
48 | PUSHER_APP_SECRET=
49 | PUSHER_HOST=
50 | PUSHER_PORT=443
51 | PUSHER_SCHEME=https
52 | PUSHER_APP_CLUSTER=mt1
53 |
54 | VITE_APP_NAME="${APP_NAME}"
55 | VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
56 | VITE_PUSHER_HOST="${PUSHER_HOST}"
57 | VITE_PUSHER_PORT="${PUSHER_PORT}"
58 | VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
59 | VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
60 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto eol=lf
2 |
3 | *.blade.php diff=html
4 | *.css diff=css
5 | *.html diff=html
6 | *.md diff=markdown
7 | *.php diff=php
8 |
9 | /.github export-ignore
10 | CHANGELOG.md export-ignore
11 | .styleci.yml export-ignore
12 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /.phpunit.cache
2 | /node_modules
3 | /public/build
4 | /public/hot
5 | /public/storage
6 | /storage/*.key
7 | /vendor
8 | .env
9 | .env.backup
10 | .env.production
11 | .phpunit.result.cache
12 | Homestead.json
13 | Homestead.yaml
14 | auth.json
15 | npm-debug.log
16 | yarn-error.log
17 | /.fleet
18 | /.idea
19 | /.vscode
20 |
21 | .codegpt
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |

2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | ## About Laravel
11 |
12 | Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
13 |
14 | - [Simple, fast routing engine](https://laravel.com/docs/routing).
15 | - [Powerful dependency injection container](https://laravel.com/docs/container).
16 | - Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
17 | - Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
18 | - Database agnostic [schema migrations](https://laravel.com/docs/migrations).
19 | - [Robust background job processing](https://laravel.com/docs/queues).
20 | - [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
21 |
22 | Laravel is accessible, powerful, and provides tools required for large, robust applications.
23 |
24 | ## Learning Laravel
25 |
26 | Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
27 |
28 | You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch.
29 |
30 | If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
31 |
32 | ## Laravel Sponsors
33 |
34 | We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the [Laravel Partners program](https://partners.laravel.com).
35 |
36 | ### Premium Partners
37 |
38 | - **[Vehikl](https://vehikl.com/)**
39 | - **[Tighten Co.](https://tighten.co)**
40 | - **[WebReinvent](https://webreinvent.com/)**
41 | - **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
42 | - **[64 Robots](https://64robots.com)**
43 | - **[Curotec](https://www.curotec.com/services/technologies/laravel/)**
44 | - **[Cyber-Duck](https://cyber-duck.co.uk)**
45 | - **[DevSquad](https://devsquad.com/hire-laravel-developers)**
46 | - **[Jump24](https://jump24.co.uk)**
47 | - **[Redberry](https://redberry.international/laravel/)**
48 | - **[Active Logic](https://activelogic.com)**
49 | - **[byte5](https://byte5.de)**
50 | - **[OP.GG](https://op.gg)**
51 |
52 | ## Contributing
53 |
54 | Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
55 |
56 | ## Code of Conduct
57 |
58 | In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
59 |
60 | ## Security Vulnerabilities
61 |
62 | If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
63 |
64 | ## License
65 |
66 | The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
67 |
--------------------------------------------------------------------------------
/Xray/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore the temp folder and its contents
2 | .vscode/
3 | results.csv
4 | ValidIPs.csv
--------------------------------------------------------------------------------
/Xray/bin/Win-64/geoip.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XRaySup/XrayServerManagement/df25235f4234b243962ca24e26595b6c114911f8/Xray/bin/Win-64/geoip.dat
--------------------------------------------------------------------------------
/Xray/bin/Win-64/geosite.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XRaySup/XrayServerManagement/df25235f4234b243962ca24e26595b6c114911f8/Xray/bin/Win-64/geosite.dat
--------------------------------------------------------------------------------
/Xray/bin/Win-64/xray.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XRaySup/XrayServerManagement/df25235f4234b243962ca24e26595b6c114911f8/Xray/bin/Win-64/xray.exe
--------------------------------------------------------------------------------
/Xray/bin/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "log": {
3 | "access": "",
4 | "error": "",
5 | "loglevel": "error"
6 | },
7 | "inbounds": [
8 | {
9 | "tag": "socks",
10 | "port": 10802,
11 | "listen": "127.0.0.1",
12 | "protocol": "socks",
13 | "sniffing": {
14 | "enabled": true,
15 | "destOverride": [
16 | "http",
17 | "tls"
18 | ],
19 | "routeOnly": false
20 | },
21 | "settings": {
22 | "auth": "noauth",
23 | "udp": true,
24 | "allowTransparent": false
25 | }
26 | },
27 | {
28 | "tag": "http",
29 | "port": 8080,
30 | "listen": "127.0.0.1",
31 | "protocol": "http",
32 | "sniffing": {
33 | "enabled": true,
34 | "destOverride": [
35 | "http",
36 | "tls"
37 | ],
38 | "routeOnly": false
39 | },
40 | "settings": {
41 | "auth": "noauth",
42 | "udp": true,
43 | "allowTransparent": false
44 | }
45 | }
46 | ],
47 | "outbounds": [
48 | {
49 | "tag": "proxy",
50 | "protocol": "vless",
51 | "settings": {
52 | "vnext": [
53 | {
54 | "address": "bia-5ct.pages.dev",
55 | "port": 443,
56 | "users": [
57 | {
58 | "id": "45487756-4bab-4df7-9004-c36bb3e6bb99",
59 | "alterId": 0,
60 | "email": "t@t.tt",
61 | "security": "auto",
62 | "encryption": "none"
63 | }
64 | ]
65 | }
66 | ]
67 | },
68 | "streamSettings": {
69 | "network": "ws",
70 | "security": "tls",
71 | "tlsSettings": {
72 | "allowInsecure": false,
73 | "serverName": "bia-5ct.pages.dev",
74 | "alpn": [
75 | "h2",
76 | "http/1.1"
77 | ],
78 | "fingerprint": "randomized",
79 | "show": false
80 | },
81 | "wsSettings": {
82 | "path": "/mZNwGxY4w4M4bRPO/PROXYIP?ed=2560",
83 | "headers": {
84 | "Host": "bia-5ct.pages.dev"
85 | }
86 | }
87 | },
88 | "mux": {
89 | "enabled": false,
90 | "concurrency": -1
91 | }
92 | },
93 | {
94 | "tag": "direct",
95 | "protocol": "freedom",
96 | "settings": {}
97 | },
98 | {
99 | "tag": "block",
100 | "protocol": "blackhole",
101 | "settings": {
102 | "response": {
103 | "type": "http"
104 | }
105 | }
106 | }
107 | ],
108 | "dns": {
109 | "servers": [
110 | "1.1.1.1",
111 | "8.8.8.8"
112 | ]
113 | },
114 | "routing": {
115 | "domainStrategy": "UseIPv4",
116 | "rules": [
117 | {
118 | "type": "field",
119 | "inboundTag": [
120 | "api"
121 | ],
122 | "outboundTag": "api"
123 | },
124 | {
125 | "type": "field",
126 | "outboundTag": "direct",
127 | "domain": [
128 | "domain:example-example.com",
129 | "domain:example-example2.com"
130 | ]
131 | },
132 | {
133 | "type": "field",
134 | "outboundTag": "block",
135 | "domain": [
136 | "geosite:category-ads-all"
137 | ]
138 | },
139 | {
140 | "type": "field",
141 | "outboundTag": "direct",
142 | "domain": [
143 | "geosite:cn"
144 | ]
145 | },
146 | {
147 | "type": "field",
148 | "outboundTag": "direct",
149 | "ip": [
150 | "geoip:private",
151 | "geoip:cn"
152 | ]
153 | },
154 | {
155 | "type": "field",
156 | "port": "0-65535",
157 | "outboundTag": "proxy"
158 | }
159 | ]
160 | }
161 | }
--------------------------------------------------------------------------------
/Xray/bin/ips.csv:
--------------------------------------------------------------------------------
1 | IP地址,端口,回源端口,TLS,数据中心,地区,国家,城市,TCP延迟(ms),速度(MB/s)
2 | 34.69.150.180,443,443,true,ORD,North America,US,Chicago,347,8.79
3 | 34.105.189.25,443,443,true,LHR,Europe,GB,London,212,8.77
4 | 34.70.91.86,443,443,true,ORD,North America,US,Chicago,281,8.71
5 | 34.70.91.86,443,443,true,ORD,North America,US,Chicago,375,8.65
6 | 34.70.91.86,443,443,true,ORD,North America,US,Chicago,300,8.65
7 | 35.197.239.137,443,443,true,LHR,Europe,GB,London,289,8.61
8 | 34.142.5.107,443,443,true,LHR,Europe,GB,London,388,8.55
9 | 35.189.113.240,443,443,true,LHR,Europe,GB,London,298,8.46
10 | 35.202.158.120,443,443,true,ORD,North America,US,Chicago,312,8.43
11 | 34.89.30.78,443,443,true,LHR,Europe,GB,London,225,8.42
12 | 34.142.31.109,443,443,true,LHR,Europe,GB,London,344,8.20
13 | 35.190.152.145,443,443,true,ATL,North America,US,Atlanta,325,8.16
14 | 35.196.72.166,443,443,true,ATL,North America,US,Atlanta,318,8.11
15 | 35.204.231.100,443,443,true,AMS,Europe,NL,Amsterdam,322,7.59
16 | 34.105.130.188,443,443,true,LHR,Europe,GB,London,357,7.59
17 | 34.175.202.195,443,443,true,MAD,Europe,ES,Madrid,412,6.57
18 | 34.105.233.161,443,443,true,LHR,Europe,GB,London,331,6.52
19 | 34.105.189.25,443,443,true,LHR,Europe,GB,London,284,6.37
20 | 35.228.36.82,443,443,true,ARN,Europe,SE,Stockholm,263,6.32
21 | 35.246.97.251,443,443,true,LHR,Europe,GB,London,281,5.69
22 | 34.105.140.105,443,443,true,LHR,Europe,GB,London,505,5.24
23 | 35.200.238.235,443,443,true,BOM,Asia Pacific,IN,Mumbai,372,0.58
24 | 35.200.238.235,443,443,true,BOM,Asia Pacific,IN,Mumbai,453,0.55
25 | 34.142.192.44,80,80,false,SIN,Asia Pacific,SG,Singapore,27,0.00
26 | 34.142.192.44,443,80,false,SIN,Asia Pacific,SG,Singapore,30,0.00
27 | 35.187.229.127,80,8080,false,SIN,Asia Pacific,SG,Singapore,37,0.00
28 | 34.92.85.233,2052,2052,false,HKG,Asia Pacific,HK,Hong Kong,38,0.00
29 | 34.92.85.233,2052,2052,false,HKG,Asia Pacific,HK,Hong Kong,60,0.00
30 | 34.93.79.152,80,80,false,BOM,Asia Pacific,IN,Mumbai,63,0.00
31 | 35.200.202.118,80,80,false,BOM,Asia Pacific,IN,Mumbai,70,0.00
32 | 34.92.85.233,2052,2052,false,HKG,Asia Pacific,HK,Hong Kong,73,0.00
33 | 34.93.226.165,80,80,false,BOM,Asia Pacific,IN,Mumbai,83,0.00
34 | 35.200.202.118,80,80,false,BOM,Asia Pacific,IN,Mumbai,100,0.00
35 | 35.201.107.185,80,80,false,SIN,Asia Pacific,SG,Singapore,101,0.00
36 | 34.93.79.152,80,80,false,BOM,Asia Pacific,IN,Mumbai,108,0.00
37 | 34.80.240.128,8080,80,false,TPE,Asia Pacific,TW,Taipei,109,0.00
38 | 34.93.226.165,80,80,false,BOM,Asia Pacific,IN,Mumbai,115,0.00
39 | 34.93.79.152,80,80,false,BOM,Asia Pacific,IN,Mumbai,119,0.00
40 | 34.120.230.33,80,80,false,SIN,Asia Pacific,SG,Singapore,123,0.00
41 | 34.80.240.128,8080,80,false,TPE,Asia Pacific,TW,Taipei,143,0.00
42 | 34.49.82.120,80,80,false,SIN,Asia Pacific,SG,Singapore,152,0.00
43 | 34.49.1.210,80,80,false,SIN,Asia Pacific,SG,Singapore,153,0.00
44 | 34.105.49.234,80,80,false,SEA,North America,US,Seattle,159,0.00
45 | 34.92.85.233,2052,2052,false,HKG,Asia Pacific,HK,Hong Kong,159,0.00
46 | 34.93.79.152,80,80,false,BOM,Asia Pacific,IN,Mumbai,159,0.00
47 | 34.117.105.161,80,80,false,SIN,Asia Pacific,SG,Singapore,161,0.00
48 | 34.141.221.33,2083,80,false,AMS,Europe,NL,Amsterdam,162,0.00
49 | 34.141.221.33,2086,80,false,AMS,Europe,NL,Amsterdam,164,0.00
50 | 34.141.221.33,2096,80,false,AMS,Europe,NL,Amsterdam,164,0.00
51 | 34.141.248.249,2052,80,false,AMS,Europe,NL,Amsterdam,165,0.00
52 | 34.141.248.249,2086,80,false,AMS,Europe,NL,Amsterdam,165,0.00
53 | 34.141.221.33,2053,80,false,AMS,Europe,NL,Amsterdam,166,0.00
54 | 34.19.114.86,443,80,false,SEA,North America,US,Seattle,166,0.00
55 | 34.141.221.33,2087,80,false,AMS,Europe,NL,Amsterdam,167,0.00
56 | 34.80.240.128,8080,80,false,TPE,Asia Pacific,TW,Taipei,167,0.00
57 | 34.160.118.77,80,80,false,SIN,Asia Pacific,SG,Singapore,167,0.00
58 | 34.141.248.249,2087,80,false,AMS,Europe,NL,Amsterdam,169,0.00
59 | 34.93.226.165,80,80,false,BOM,Asia Pacific,IN,Mumbai,170,0.00
60 | 34.82.76.253,80,80,false,SEA,North America,US,Seattle,173,0.00
61 | 34.111.135.19,80,80,false,SIN,Asia Pacific,SG,Singapore,177,0.00
62 | 34.82.76.253,80,80,false,SEA,North America,US,Seattle,179,0.00
63 | 35.187.41.171,2083,80,false,CDG,Europe,FR,Paris,184,0.00
64 | 34.19.114.86,443,80,false,SEA,North America,US,Seattle,184,0.00
65 | 34.160.118.77,80,80,false,SIN,Asia Pacific,SG,Singapore,185,0.00
66 | 34.141.221.33,2095,80,false,AMS,Europe,NL,Amsterdam,186,0.00
67 | 34.141.248.249,2083,80,false,AMS,Europe,NL,Amsterdam,188,0.00
68 | 34.141.221.33,2052,80,false,AMS,Europe,NL,Amsterdam,193,0.00
69 | 34.141.248.249,2082,80,false,AMS,Europe,NL,Amsterdam,194,0.00
70 | 35.247.124.181,80,80,false,SEA,North America,US,Seattle,194,0.00
71 | 34.54.241.45,80,80,false,SIN,Asia Pacific,SG,Singapore,198,0.00
72 | 34.93.226.165,80,80,false,BOM,Asia Pacific,IN,Mumbai,200,0.00
73 | 34.141.248.249,2053,80,false,AMS,Europe,NL,Amsterdam,207,0.00
74 | 35.232.39.116,80,80,false,DFW,North America,US,Dallas,207,0.00
75 | 35.202.49.74,80,80,false,ORD,North America,US,Chicago,207,0.00
76 | 34.70.88.252,443,80,false,ORD,North America,US,Chicago,208,0.00
77 | 34.56.143.151,80,8080,false,ORD,North America,US,Chicago,208,0.00
78 | 34.56.143.151,80,8080,false,ORD,North America,US,Chicago,210,0.00
79 | 34.70.88.252,443,80,false,ORD,North America,US,Chicago,211,0.00
80 | 34.141.248.249,2096,80,false,AMS,Europe,NL,Amsterdam,213,0.00
81 | 34.19.114.86,80,80,false,SEA,North America,US,Seattle,213,0.00
82 | 35.185.235.217,80,80,false,SEA,North America,US,Seattle,215,0.00
83 | 34.105.49.234,80,80,false,SEA,North America,US,Seattle,217,0.00
84 | 34.74.105.17,80,8080,false,ATL,North America,US,Atlanta,219,0.00
85 | 34.105.49.234,80,80,false,SEA,North America,US,Seattle,223,0.00
86 | 34.141.248.249,2095,80,false,AMS,Europe,NL,Amsterdam,224,0.00
87 | 34.82.76.253,80,80,false,SEA,North America,US,Seattle,225,0.00
88 | 34.19.114.86,80,80,false,SEA,North America,US,Seattle,226,0.00
89 | 34.70.88.252,443,80,false,ORD,North America,US,Chicago,232,0.00
90 | 35.197.89.213,80,80,false,SEA,North America,US,Seattle,232,0.00
91 | 34.141.221.33,2082,80,false,AMS,Europe,NL,Amsterdam,233,0.00
92 | 34.111.135.19,80,80,false,SIN,Asia Pacific,SG,Singapore,233,0.00
93 | 104.196.221.253,80,80,false,IAD,North America,US,Ashburn,237,0.00
94 | 35.202.49.74,80,80,false,ORD,North America,US,Chicago,240,0.00
95 | 35.188.87.85,80,8080,false,ORD,North America,US,Chicago,241,0.00
96 | 34.70.88.252,443,80,false,ORD,North America,US,Chicago,242,0.00
97 | 34.80.240.128,8080,80,false,TPE,Asia Pacific,TW,Taipei,248,0.00
98 | 34.74.105.17,80,8080,false,ATL,North America,US,Atlanta,258,0.00
99 | 34.102.16.161,80,80,false,LAX,North America,US,Los Angeles,266,0.00
100 | 35.202.49.74,80,80,false,ORD,North America,US,Chicago,266,0.00
101 | 34.82.76.253,80,80,false,SEA,North America,US,Seattle,270,0.00
102 |
--------------------------------------------------------------------------------
/Xray/bin/linux-64/README.md:
--------------------------------------------------------------------------------
1 | # Project X
2 |
3 | [Project X](https://github.com/XTLS) originates from XTLS protocol, providing a set of network tools such as [Xray-core](https://github.com/XTLS/Xray-core) and [REALITY](https://github.com/XTLS/REALITY).
4 |
5 | [README](https://github.com/XTLS/Xray-core#readme) is open, so feel free to submit your project [here](https://github.com/XTLS/Xray-core/pulls).
6 |
7 | ## Donation & NFTs
8 |
9 | - **ETH/USDT/USDC: `0xDc3Fe44F0f25D13CACb1C4896CD0D321df3146Ee`**
10 | - **Project X NFT: [Announcement of NFTs by Project X](https://github.com/XTLS/Xray-core/discussions/3633)**
11 | - **REALITY NFT: [XHTTP: Beyond REALITY](https://github.com/XTLS/Xray-core/discussions/4113)**
12 |
13 | ## License
14 |
15 | [Mozilla Public License Version 2.0](https://github.com/XTLS/Xray-core/blob/main/LICENSE)
16 |
17 | ## Documentation
18 |
19 | [Project X Official Website](https://xtls.github.io)
20 |
21 | ## Telegram
22 |
23 | [Project X](https://t.me/projectXray)
24 |
25 | [Project X Channel](https://t.me/projectXtls)
26 |
27 | [Project VLESS](https://t.me/projectVless) (non-Chinese)
28 |
29 | ## Installation
30 |
31 | - Linux Script
32 | - [XTLS/Xray-install](https://github.com/XTLS/Xray-install) (**Official**)
33 | - [tempest](https://github.com/team-cloudchaser/tempest) (supports [`systemd`](https://systemd.io) and [OpenRC](https://github.com/OpenRC/openrc); Linux-only)
34 | - Docker
35 | - [ghcr.io/xtls/xray-core](https://ghcr.io/xtls/xray-core) (**Official**)
36 | - [teddysun/xray](https://hub.docker.com/r/teddysun/xray)
37 | - [wulabing/xray_docker](https://github.com/wulabing/xray_docker)
38 | - Web Panel - **WARNING: Please DO NOT USE plain HTTP panels like 3X-UI**, as they are believed to be bribed by Iran GFW for supporting plain HTTP by default and refused to change (https://github.com/XTLS/Xray-core/pull/3884#issuecomment-2439595331), which has already put many users' data security in danger in the past few years. **If you are already using 3X-UI, please switch to the following panels, which are verified to support HTTPS and SSH port forwarding only:**
39 | - [Marzban](https://github.com/Gozargah/Marzban)
40 | - [Xray-UI](https://github.com/qist/xray-ui)
41 | - [Hiddify](https://github.com/hiddify/Hiddify-Manager)
42 | - One Click
43 | - [Xray-REALITY](https://github.com/zxcvos/Xray-script), [xray-reality](https://github.com/sajjaddg/xray-reality), [reality-ezpz](https://github.com/aleskxyz/reality-ezpz)
44 | - [Xray_bash_onekey](https://github.com/hello-yunshu/Xray_bash_onekey), [XTool](https://github.com/LordPenguin666/XTool)
45 | - [v2ray-agent](https://github.com/mack-a/v2ray-agent), [Xray_onekey](https://github.com/wulabing/Xray_onekey), [ProxySU](https://github.com/proxysu/ProxySU)
46 | - Magisk
47 | - [Xray4Magisk](https://github.com/Asterisk4Magisk/Xray4Magisk)
48 | - [Xray_For_Magisk](https://github.com/E7KMbb/Xray_For_Magisk)
49 | - Homebrew
50 | - `brew install xray`
51 |
52 | ## Usage
53 |
54 | - Example
55 | - [VLESS-XTLS-uTLS-REALITY](https://github.com/XTLS/REALITY#readme)
56 | - [VLESS-TCP-XTLS-Vision](https://github.com/XTLS/Xray-examples/tree/main/VLESS-TCP-XTLS-Vision)
57 | - [All-in-One-fallbacks-Nginx](https://github.com/XTLS/Xray-examples/tree/main/All-in-One-fallbacks-Nginx)
58 | - Xray-examples
59 | - [XTLS/Xray-examples](https://github.com/XTLS/Xray-examples)
60 | - [chika0801/Xray-examples](https://github.com/chika0801/Xray-examples)
61 | - [lxhao61/integrated-examples](https://github.com/lxhao61/integrated-examples)
62 | - Tutorial
63 | - [XTLS Vision](https://github.com/chika0801/Xray-install)
64 | - [REALITY (English)](https://cscot.pages.dev/2023/03/02/Xray-REALITY-tutorial/)
65 | - [XTLS-Iran-Reality (English)](https://github.com/SasukeFreestyle/XTLS-Iran-Reality)
66 | - [Xray REALITY with 'steal oneself' (English)](https://computerscot.github.io/vless-xtls-utls-reality-steal-oneself.html)
67 | - [Xray with WireGuard inbound (English)](https://g800.pages.dev/wireguard)
68 |
69 | ## GUI Clients
70 |
71 | - OpenWrt
72 | - [PassWall](https://github.com/xiaorouji/openwrt-passwall), [PassWall 2](https://github.com/xiaorouji/openwrt-passwall2)
73 | - [ShadowSocksR Plus+](https://github.com/fw876/helloworld)
74 | - [luci-app-xray](https://github.com/yichya/luci-app-xray) ([openwrt-xray](https://github.com/yichya/openwrt-xray))
75 | - Windows
76 | - [v2rayN](https://github.com/2dust/v2rayN)
77 | - [Furious](https://github.com/LorenEteval/Furious)
78 | - [Invisible Man - Xray](https://github.com/InvisibleManVPN/InvisibleMan-XRayClient)
79 | - Android
80 | - [v2rayNG](https://github.com/2dust/v2rayNG)
81 | - [X-flutter](https://github.com/XTLS/X-flutter)
82 | - [SaeedDev94/Xray](https://github.com/SaeedDev94/Xray)
83 | - iOS & macOS arm64
84 | - [FoXray](https://apps.apple.com/app/foxray/id6448898396)
85 | - [Streisand](https://apps.apple.com/app/streisand/id6450534064)
86 | - macOS arm64 & x64
87 | - [V2rayU](https://github.com/yanue/V2rayU)
88 | - [V2RayXS](https://github.com/tzmax/V2RayXS)
89 | - [Furious](https://github.com/LorenEteval/Furious)
90 | - [FoXray](https://apps.apple.com/app/foxray/id6448898396)
91 | - Linux
92 | - [v2rayA](https://github.com/v2rayA/v2rayA)
93 | - [Furious](https://github.com/LorenEteval/Furious)
94 |
95 | ## Others that support VLESS, XTLS, REALITY, XUDP, PLUX...
96 |
97 | - iOS & macOS arm64
98 | - [Shadowrocket](https://apps.apple.com/app/shadowrocket/id932747118)
99 | - Xray Tools
100 | - [xray-knife](https://github.com/lilendian0x00/xray-knife)
101 | - Xray Wrapper
102 | - [XTLS/libXray](https://github.com/XTLS/libXray)
103 | - [xtlsapi](https://github.com/hiddify/xtlsapi)
104 | - [AndroidLibXrayLite](https://github.com/2dust/AndroidLibXrayLite)
105 | - [Xray-core-python](https://github.com/LorenEteval/Xray-core-python)
106 | - [xray-api](https://github.com/XVGuardian/xray-api)
107 | - [XrayR](https://github.com/XrayR-project/XrayR)
108 | - [XrayR-release](https://github.com/XrayR-project/XrayR-release)
109 | - [XrayR-V2Board](https://github.com/missuo/XrayR-V2Board)
110 | - [Clash.Meta](https://github.com/MetaCubeX/Clash.Meta)
111 | - [clashN](https://github.com/2dust/clashN)
112 | - [Clash Meta for Android](https://github.com/MetaCubeX/ClashMetaForAndroid)
113 | - [sing-box](https://github.com/SagerNet/sing-box)
114 |
115 | ## Contributing
116 |
117 | [Code of Conduct](https://github.com/XTLS/Xray-core/blob/main/CODE_OF_CONDUCT.md)
118 |
119 | ## Credits
120 |
121 | - [Xray-core v1.0.0](https://github.com/XTLS/Xray-core/releases/tag/v1.0.0) was forked from [v2fly-core 9a03cc5](https://github.com/v2fly/v2ray-core/commit/9a03cc5c98d04cc28320fcee26dbc236b3291256), and we have made & accumulated a huge number of enhancements over time, check [the release notes for each version](https://github.com/XTLS/Xray-core/releases).
122 | - For third-party projects used in [Xray-core](https://github.com/XTLS/Xray-core), check your local or [the latest go.mod](https://github.com/XTLS/Xray-core/blob/main/go.mod).
123 |
124 | ## Compilation
125 |
126 | ### Windows (PowerShell)
127 |
128 | ```powershell
129 | $env:CGO_ENABLED=0
130 | go build -o xray.exe -trimpath -ldflags "-s -w -buildid=" ./main
131 | ```
132 |
133 | ### Linux / macOS
134 |
135 | ```bash
136 | CGO_ENABLED=0 go build -o xray -trimpath -ldflags "-s -w -buildid=" ./main
137 | ```
138 |
139 | ### Reproducible Releases
140 |
141 | ```bash
142 | make
143 | ```
144 |
145 | ## Stargazers over time
146 |
147 | [](https://starchart.cc/XTLS/Xray-core)
148 |
--------------------------------------------------------------------------------
/Xray/bin/linux-64/geoip.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XRaySup/XrayServerManagement/df25235f4234b243962ca24e26595b6c114911f8/Xray/bin/linux-64/geoip.dat
--------------------------------------------------------------------------------
/Xray/bin/linux-64/geosite.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XRaySup/XrayServerManagement/df25235f4234b243962ca24e26595b6c114911f8/Xray/bin/linux-64/geosite.dat
--------------------------------------------------------------------------------
/Xray/bin/linux-64/xray:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XRaySup/XrayServerManagement/df25235f4234b243962ca24e26595b6c114911f8/Xray/bin/linux-64/xray
--------------------------------------------------------------------------------
/Xray/bin/linux-arm64/README.md:
--------------------------------------------------------------------------------
1 | # Project X
2 |
3 | [Project X](https://github.com/XTLS) originates from XTLS protocol, providing a set of network tools such as [Xray-core](https://github.com/XTLS/Xray-core) and [REALITY](https://github.com/XTLS/REALITY).
4 |
5 | [README](https://github.com/XTLS/Xray-core#readme) is open, so feel free to submit your project [here](https://github.com/XTLS/Xray-core/pulls).
6 |
7 | ## Donation & NFTs
8 |
9 | - **ETH/USDT/USDC: `0xDc3Fe44F0f25D13CACb1C4896CD0D321df3146Ee`**
10 | - **Project X NFT: [Announcement of NFTs by Project X](https://github.com/XTLS/Xray-core/discussions/3633)**
11 | - **REALITY NFT: [XHTTP: Beyond REALITY](https://github.com/XTLS/Xray-core/discussions/4113)**
12 |
13 | ## License
14 |
15 | [Mozilla Public License Version 2.0](https://github.com/XTLS/Xray-core/blob/main/LICENSE)
16 |
17 | ## Documentation
18 |
19 | [Project X Official Website](https://xtls.github.io)
20 |
21 | ## Telegram
22 |
23 | [Project X](https://t.me/projectXray)
24 |
25 | [Project X Channel](https://t.me/projectXtls)
26 |
27 | [Project VLESS](https://t.me/projectVless) (non-Chinese)
28 |
29 | ## Installation
30 |
31 | - Linux Script
32 | - [XTLS/Xray-install](https://github.com/XTLS/Xray-install) (**Official**)
33 | - [tempest](https://github.com/team-cloudchaser/tempest) (supports [`systemd`](https://systemd.io) and [OpenRC](https://github.com/OpenRC/openrc); Linux-only)
34 | - Docker
35 | - [ghcr.io/xtls/xray-core](https://ghcr.io/xtls/xray-core) (**Official**)
36 | - [teddysun/xray](https://hub.docker.com/r/teddysun/xray)
37 | - [wulabing/xray_docker](https://github.com/wulabing/xray_docker)
38 | - Web Panel - **WARNING: Please DO NOT USE plain HTTP panels like 3X-UI**, as they are believed to be bribed by Iran GFW for supporting plain HTTP by default and refused to change (https://github.com/XTLS/Xray-core/pull/3884#issuecomment-2439595331), which has already put many users' data security in danger in the past few years. **If you are already using 3X-UI, please switch to the following panels, which are verified to support HTTPS and SSH port forwarding only:**
39 | - [Marzban](https://github.com/Gozargah/Marzban)
40 | - [Xray-UI](https://github.com/qist/xray-ui)
41 | - [Hiddify](https://github.com/hiddify/Hiddify-Manager)
42 | - One Click
43 | - [Xray-REALITY](https://github.com/zxcvos/Xray-script), [xray-reality](https://github.com/sajjaddg/xray-reality), [reality-ezpz](https://github.com/aleskxyz/reality-ezpz)
44 | - [Xray_bash_onekey](https://github.com/hello-yunshu/Xray_bash_onekey), [XTool](https://github.com/LordPenguin666/XTool)
45 | - [v2ray-agent](https://github.com/mack-a/v2ray-agent), [Xray_onekey](https://github.com/wulabing/Xray_onekey), [ProxySU](https://github.com/proxysu/ProxySU)
46 | - Magisk
47 | - [Xray4Magisk](https://github.com/Asterisk4Magisk/Xray4Magisk)
48 | - [Xray_For_Magisk](https://github.com/E7KMbb/Xray_For_Magisk)
49 | - Homebrew
50 | - `brew install xray`
51 |
52 | ## Usage
53 |
54 | - Example
55 | - [VLESS-XTLS-uTLS-REALITY](https://github.com/XTLS/REALITY#readme)
56 | - [VLESS-TCP-XTLS-Vision](https://github.com/XTLS/Xray-examples/tree/main/VLESS-TCP-XTLS-Vision)
57 | - [All-in-One-fallbacks-Nginx](https://github.com/XTLS/Xray-examples/tree/main/All-in-One-fallbacks-Nginx)
58 | - Xray-examples
59 | - [XTLS/Xray-examples](https://github.com/XTLS/Xray-examples)
60 | - [chika0801/Xray-examples](https://github.com/chika0801/Xray-examples)
61 | - [lxhao61/integrated-examples](https://github.com/lxhao61/integrated-examples)
62 | - Tutorial
63 | - [XTLS Vision](https://github.com/chika0801/Xray-install)
64 | - [REALITY (English)](https://cscot.pages.dev/2023/03/02/Xray-REALITY-tutorial/)
65 | - [XTLS-Iran-Reality (English)](https://github.com/SasukeFreestyle/XTLS-Iran-Reality)
66 | - [Xray REALITY with 'steal oneself' (English)](https://computerscot.github.io/vless-xtls-utls-reality-steal-oneself.html)
67 | - [Xray with WireGuard inbound (English)](https://g800.pages.dev/wireguard)
68 |
69 | ## GUI Clients
70 |
71 | - OpenWrt
72 | - [PassWall](https://github.com/xiaorouji/openwrt-passwall), [PassWall 2](https://github.com/xiaorouji/openwrt-passwall2)
73 | - [ShadowSocksR Plus+](https://github.com/fw876/helloworld)
74 | - [luci-app-xray](https://github.com/yichya/luci-app-xray) ([openwrt-xray](https://github.com/yichya/openwrt-xray))
75 | - Windows
76 | - [v2rayN](https://github.com/2dust/v2rayN)
77 | - [Furious](https://github.com/LorenEteval/Furious)
78 | - [Invisible Man - Xray](https://github.com/InvisibleManVPN/InvisibleMan-XRayClient)
79 | - Android
80 | - [v2rayNG](https://github.com/2dust/v2rayNG)
81 | - [X-flutter](https://github.com/XTLS/X-flutter)
82 | - [SaeedDev94/Xray](https://github.com/SaeedDev94/Xray)
83 | - iOS & macOS arm64
84 | - [FoXray](https://apps.apple.com/app/foxray/id6448898396)
85 | - [Streisand](https://apps.apple.com/app/streisand/id6450534064)
86 | - macOS arm64 & x64
87 | - [V2rayU](https://github.com/yanue/V2rayU)
88 | - [V2RayXS](https://github.com/tzmax/V2RayXS)
89 | - [Furious](https://github.com/LorenEteval/Furious)
90 | - [FoXray](https://apps.apple.com/app/foxray/id6448898396)
91 | - Linux
92 | - [v2rayA](https://github.com/v2rayA/v2rayA)
93 | - [Furious](https://github.com/LorenEteval/Furious)
94 |
95 | ## Others that support VLESS, XTLS, REALITY, XUDP, PLUX...
96 |
97 | - iOS & macOS arm64
98 | - [Shadowrocket](https://apps.apple.com/app/shadowrocket/id932747118)
99 | - Xray Tools
100 | - [xray-knife](https://github.com/lilendian0x00/xray-knife)
101 | - Xray Wrapper
102 | - [XTLS/libXray](https://github.com/XTLS/libXray)
103 | - [xtlsapi](https://github.com/hiddify/xtlsapi)
104 | - [AndroidLibXrayLite](https://github.com/2dust/AndroidLibXrayLite)
105 | - [Xray-core-python](https://github.com/LorenEteval/Xray-core-python)
106 | - [xray-api](https://github.com/XVGuardian/xray-api)
107 | - [XrayR](https://github.com/XrayR-project/XrayR)
108 | - [XrayR-release](https://github.com/XrayR-project/XrayR-release)
109 | - [XrayR-V2Board](https://github.com/missuo/XrayR-V2Board)
110 | - [Clash.Meta](https://github.com/MetaCubeX/Clash.Meta)
111 | - [clashN](https://github.com/2dust/clashN)
112 | - [Clash Meta for Android](https://github.com/MetaCubeX/ClashMetaForAndroid)
113 | - [sing-box](https://github.com/SagerNet/sing-box)
114 |
115 | ## Contributing
116 |
117 | [Code of Conduct](https://github.com/XTLS/Xray-core/blob/main/CODE_OF_CONDUCT.md)
118 |
119 | ## Credits
120 |
121 | - [Xray-core v1.0.0](https://github.com/XTLS/Xray-core/releases/tag/v1.0.0) was forked from [v2fly-core 9a03cc5](https://github.com/v2fly/v2ray-core/commit/9a03cc5c98d04cc28320fcee26dbc236b3291256), and we have made & accumulated a huge number of enhancements over time, check [the release notes for each version](https://github.com/XTLS/Xray-core/releases).
122 | - For third-party projects used in [Xray-core](https://github.com/XTLS/Xray-core), check your local or [the latest go.mod](https://github.com/XTLS/Xray-core/blob/main/go.mod).
123 |
124 | ## Compilation
125 |
126 | ### Windows (PowerShell)
127 |
128 | ```powershell
129 | $env:CGO_ENABLED=0
130 | go build -o xray.exe -trimpath -ldflags "-s -w -buildid=" ./main
131 | ```
132 |
133 | ### Linux / macOS
134 |
135 | ```bash
136 | CGO_ENABLED=0 go build -o xray -trimpath -ldflags "-s -w -buildid=" ./main
137 | ```
138 |
139 | ### Reproducible Releases
140 |
141 | ```bash
142 | make
143 | ```
144 |
145 | ## Stargazers over time
146 |
147 | [](https://starchart.cc/XTLS/Xray-core)
148 |
--------------------------------------------------------------------------------
/Xray/bin/linux-arm64/geoip.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XRaySup/XrayServerManagement/df25235f4234b243962ca24e26595b6c114911f8/Xray/bin/linux-arm64/geoip.dat
--------------------------------------------------------------------------------
/Xray/bin/linux-arm64/geosite.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XRaySup/XrayServerManagement/df25235f4234b243962ca24e26595b6c114911f8/Xray/bin/linux-arm64/geosite.dat
--------------------------------------------------------------------------------
/Xray/bin/linux-arm64/xray:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XRaySup/XrayServerManagement/df25235f4234b243962ca24e26595b6c114911f8/Xray/bin/linux-arm64/xray
--------------------------------------------------------------------------------
/Xray/temp/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
--------------------------------------------------------------------------------
/app/Console/Commands/HelloWorldCommand.php:
--------------------------------------------------------------------------------
1 | status == "ONLINE") {
32 | $message .= "{$server->remark} | *{$server->todayUsage}* \n";
33 | $totalUsage += $server->todayUsage;
34 | }
35 | }
36 | $message .= "Total | *{$totalUsage}* \n";
37 | // Send the message to the admin
38 | $telegram->sendMessage([
39 | 'chat_id' => $adminChatId,
40 | 'text' => $message,
41 | 'parse_mode' => 'Markdown'
42 | ]);
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/app/Console/Commands/ProcessIpCommand.php:
--------------------------------------------------------------------------------
1 | info('Processing IP address...');
32 | // $ipAddress = $this->argument('ip');
33 | $dnsUpdateService = new DnsUpdateService(function ($message) {
34 | $this->info($message);
35 | });
36 |
37 | $telegram = Telegram::bot('Proxy');
38 | $message = $telegram->sendMessage([
39 | 'chat_id' => env('TELEGRAM_TEST_ADMIN_IDS'),
40 | 'text' => 'job started',
41 | ]);
42 | $dnsUpdateService->messages= [$message];
43 | //$dnsUpdateService->processIp($ipAddress);
44 | //$filecontent = file_get_contents(base_path('Xray/bin/ips.csv'));
45 | //$dnsUpdateService->processFileContent($filecontent, $message);
46 | $dnsUpdateService->DNSCheck();
47 | //dump($dnsUpdateService->DNSCheck());
48 | return 0;
49 | }
50 | }
--------------------------------------------------------------------------------
/app/Console/Commands/RunDnsUpdate.php:
--------------------------------------------------------------------------------
1 | info($message);
24 | });
25 | $dnsUpdateService->handle();
26 |
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/app/Console/Kernel.php:
--------------------------------------------------------------------------------
1 | command('inspire')->hourly();
17 | $schedule->call('updateServers')->everyThirtyMinutes();
18 | // Schedule the RunDnsUpdate command to run every 30 minutes
19 | $schedule->command('dns:update')->everyThirtyMinutes();
20 |
21 |
22 | }
23 |
24 | /**
25 | * Register the commands for the application.
26 | */
27 | protected function commands(): void
28 | {
29 | $this->load(__DIR__.'/Commands');
30 |
31 | require base_path('routes/console.php');
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/Exceptions/Handler.php:
--------------------------------------------------------------------------------
1 |
14 | */
15 | protected $dontFlash = [
16 | 'current_password',
17 | 'password',
18 | 'password_confirmation',
19 | ];
20 |
21 | /**
22 | * Register the exception handling callbacks for the application.
23 | */
24 | public function register(): void
25 | {
26 | $this->reportable(function (Throwable $e) {
27 | //
28 | });
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/Filament/Resources/OwnerResource.php:
--------------------------------------------------------------------------------
1 | schema([
30 | TextInput::make('name')
31 | ->required(),
32 | ]);
33 | }
34 |
35 | public static function table(Table $table): Table
36 | {
37 | return $table
38 | ->columns([
39 | TextColumn::make('name')
40 | ->searchable()
41 | ->sortable(),
42 | ])
43 | ->filters([
44 | //
45 | ])
46 | ->actions([
47 | EditAction::make(),
48 | DeleteAction::make(),
49 | ])
50 | ->bulkActions([
51 | BulkActionGroup::make([
52 | DeleteBulkAction::make(),
53 | ]),
54 | ]);
55 | }
56 |
57 | public static function getPages(): array
58 | {
59 | return [
60 | 'index' => Pages\ListOwners::route('/'),
61 | ];
62 | }
63 |
64 | public static function getGloballySearchableAttributes(): array
65 | {
66 | return ['name'];
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/app/Filament/Resources/OwnerResource/Pages/CreateOwner.php:
--------------------------------------------------------------------------------
1 | schema([
30 | TextInput::make('name')
31 | ->required(),
32 |
33 | TextInput::make('provider')
34 | ->required(),
35 |
36 | TextInput::make('api_key')
37 | ->required(),
38 |
39 | ]);
40 | }
41 |
42 | public static function table(Table $table): Table
43 | {
44 | return $table
45 | ->columns([
46 | TextColumn::make('name')
47 | ->searchable()
48 | ->sortable(),
49 |
50 | TextColumn::make('provider'),
51 |
52 | TextColumn::make('api_key'),
53 | ])
54 | ->filters([
55 | //
56 | ])
57 | ->actions([
58 | EditAction::make(),
59 | DeleteAction::make(),
60 | ])
61 | ->bulkActions([
62 | BulkActionGroup::make([
63 | DeleteBulkAction::make(),
64 | ]),
65 | ]);
66 | }
67 |
68 | public static function getPages(): array
69 | {
70 | return [
71 | 'index' => Pages\ListProjects::route('/'),
72 | ];
73 | }
74 |
75 | public static function getGloballySearchableAttributes(): array
76 | {
77 | return ['name'];
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/app/Filament/Resources/ProjectResource/Pages/CreateProject.php:
--------------------------------------------------------------------------------
1 | schema([
40 | TextInput::make("name")
41 | ->label("نام")
42 | ->required(),
43 |
44 | TextInput::make("email")
45 | ->label("ایمیل")
46 | ->email()
47 | ->required()
48 | ->unique(ignoreRecord: true),
49 |
50 | TextInput::make("mobile")
51 | ->label("موبایل")
52 | ->required()
53 | ->extraAttributes(["style" => "direction:ltr"])
54 | ->unique(ignoreRecord: true),
55 |
56 | TextInput::make("password")
57 | ->password()
58 | ->dehydrateStateUsing(fn($state) => \Hash::make($state))
59 | ->dehydrated(fn($state) => filled($state))
60 | ->required(fn(string $context): bool => $context === "create")
61 | ->label("پسورد"),
62 |
63 | // Toggle::make("active")
64 | // ->label("فعال")
65 | // ->default(fn() => true),
66 | // CheckboxList::make("roles")
67 | // ->label("نقش")
68 | // ->relationship("roles", "label"),
69 | ]);
70 | }
71 |
72 | public static function table(Table $table): Table
73 | {
74 | return $table
75 | ->columns([
76 | TextColumn::make("name")
77 | ->label("نام")
78 | ->searchable()
79 | ->sortable(),
80 |
81 | TextColumn::make("email")
82 | ->label("ایمیل")
83 | ->searchable()
84 | ->sortable(),
85 |
86 | // TextColumn::make("roles.label")
87 | // ->label("نقشها")
88 | // ->searchable()
89 | // ->sortable(),
90 |
91 | TextColumn::make("mobile")
92 | ->searchable()
93 | ->label("موبایل"),
94 |
95 | // IconColumn::make("active")
96 | // ->boolean()
97 | // ->sortable()
98 | // ->label("فعال"),
99 | ])
100 | ->actions([
101 | // Impersonate::make("جعل"),
102 | \Filament\Tables\Actions\EditAction::make("edit-user"),
103 | DeleteAction::make(),
104 | ])
105 | ->defaultSort("id", "desc")
106 | ->bulkActions([
107 | // SmsAction::make("users-sms"),
108 | // BulkAction::make("notification")
109 | // ->label("ارسال Notification ")
110 | // ->icon("heroicon-o-chat-bubble-oval-left-ellipsis")
111 | // ->modalHeading("ارسال Notification به کاربران سامانه")
112 | // ->modalSubmitActionLabel("ارسال")
113 | // ->form([
114 | // Textarea::make("message")
115 | // ->label("پیام")
116 | // ->required(),
117 | // ])
118 | // ->action(function (Collection $records, array $data): void {
119 | // $records->each->notify(
120 | // Notification::make()
121 | // ->title(\Auth::user()->name)
122 | // ->body($data["message"])
123 | // ->success()
124 | // ->toDatabase()
125 | // );
126 | // Notification::make()
127 | // ->title("ارسال Notification به کاربران انجام شد.")
128 | // ->success()
129 | // ->send();
130 | // }),
131 | ]);
132 | }
133 |
134 | public static function getPages(): array
135 | {
136 | return [
137 | "index" => Pages\ListUsers::route("/"),
138 | ];
139 | }
140 | }
141 |
--------------------------------------------------------------------------------
/app/Filament/Resources/UserResource.php.old:
--------------------------------------------------------------------------------
1 | schema([
26 | //
27 | ]);
28 | }
29 |
30 | public static function table(Table $table): Table
31 | {
32 | return $table
33 | ->columns([
34 | //
35 | ])
36 | ->filters([
37 | //
38 | ])
39 | ->actions([
40 | Tables\Actions\EditAction::make(),
41 | ])
42 | ->bulkActions([
43 | Tables\Actions\BulkActionGroup::make([
44 | Tables\Actions\DeleteBulkAction::make(),
45 | ]),
46 | ]);
47 | }
48 |
49 | public static function getRelations(): array
50 | {
51 | return [
52 | //
53 | ];
54 | }
55 |
56 | public static function getPages(): array
57 | {
58 | return [
59 | 'index' => Pages\ListUsers::route('/'),
60 | 'create' => Pages\CreateUser::route('/create'),
61 | 'edit' => Pages\EditUser::route('/{record}/edit'),
62 | ];
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/app/Filament/Resources/UserResource/Pages/CreateUser.php:
--------------------------------------------------------------------------------
1 | todayUsage;
28 | $totalYesterdayUsage += $server->yesterdayUsage;
29 | $totalWeeklyUsage += $server->weeklyUsage;
30 | }
31 |
32 |
33 | return $table
34 | ->query(ServerResource::getEloquentQuery())
35 | ->columns([
36 |
37 | TextColumn::make('remark')
38 | ->searchable()
39 | ->sortable(),
40 | TextColumn::make('today usage')
41 | ->sortable()
42 | ->summarize(Summarizer::make()
43 | ->label($totalTodayUsage)),
44 | TextColumn::make('yesterday usage')
45 | ->sortable()
46 | ->summarize(Summarizer::make()
47 | ->label($totalYesterdayUsage)),
48 | TextColumn::make('weekly usage')
49 | ->sortable()
50 | ->summarize(Summarizer::make()
51 | ->label($totalWeeklyUsage))
52 | ])
53 | ->filters([
54 | SelectFilter::make('status')
55 | ->options(Server::stats())
56 | ->default('ONLINE')
57 | ]);
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Controller.php:
--------------------------------------------------------------------------------
1 | all();
16 |
17 | // Dispatch the job to handle the message
18 | // Log::info('TelegramWebhookController: handle');
19 | // Log::info('Request: ' . print_r($requestData, true));
20 | HandleTelegramMessage::dispatch($requestData);
21 |
22 | return response()->json(['status' => 'ok']);
23 | } catch (\Exception $e) {
24 | Log::error('Error handling webhook: ' . $e->getMessage());
25 | return response()->json(['status' => 'error', 'message' => $e->getMessage()], 500);
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/Http/Kernel.php:
--------------------------------------------------------------------------------
1 |
15 | */
16 | protected $middleware = [
17 | // \App\Http\Middleware\TrustHosts::class,
18 | \App\Http\Middleware\TrustProxies::class,
19 | \Illuminate\Http\Middleware\HandleCors::class,
20 | \App\Http\Middleware\PreventRequestsDuringMaintenance::class,
21 | \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
22 | \App\Http\Middleware\TrimStrings::class,
23 | \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
24 | ];
25 |
26 | /**
27 | * The application's route middleware groups.
28 | *
29 | * @var array>
30 | */
31 | protected $middlewareGroups = [
32 | 'web' => [
33 | \App\Http\Middleware\EncryptCookies::class,
34 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
35 | \Illuminate\Session\Middleware\StartSession::class,
36 | \Illuminate\View\Middleware\ShareErrorsFromSession::class,
37 | \App\Http\Middleware\VerifyCsrfToken::class,
38 | \Illuminate\Routing\Middleware\SubstituteBindings::class,
39 | ],
40 |
41 | 'api' => [
42 | // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
43 | \Illuminate\Routing\Middleware\ThrottleRequests::class.':api',
44 | \Illuminate\Routing\Middleware\SubstituteBindings::class,
45 | ],
46 | ];
47 |
48 | /**
49 | * The application's middleware aliases.
50 | *
51 | * Aliases may be used instead of class names to conveniently assign middleware to routes and groups.
52 | *
53 | * @var array
54 | */
55 | protected $middlewareAliases = [
56 | 'auth' => \App\Http\Middleware\Authenticate::class,
57 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
58 | 'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,
59 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
60 | 'can' => \Illuminate\Auth\Middleware\Authorize::class,
61 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
62 | 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
63 | 'precognitive' => \Illuminate\Foundation\Http\Middleware\HandlePrecognitiveRequests::class,
64 | 'signed' => \App\Http\Middleware\ValidateSignature::class,
65 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
66 | 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
67 | ];
68 | }
69 |
--------------------------------------------------------------------------------
/app/Http/Middleware/Authenticate.php:
--------------------------------------------------------------------------------
1 | expectsJson() ? null : route('login');
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/app/Http/Middleware/EncryptCookies.php:
--------------------------------------------------------------------------------
1 |
13 | */
14 | protected $except = [
15 | //
16 | ];
17 | }
18 |
--------------------------------------------------------------------------------
/app/Http/Middleware/PreventRequestsDuringMaintenance.php:
--------------------------------------------------------------------------------
1 |
13 | */
14 | protected $except = [
15 | //
16 | ];
17 | }
18 |
--------------------------------------------------------------------------------
/app/Http/Middleware/RedirectIfAuthenticated.php:
--------------------------------------------------------------------------------
1 | check()) {
24 | return redirect(RouteServiceProvider::HOME);
25 | }
26 | }
27 |
28 | return $next($request);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/Http/Middleware/TrimStrings.php:
--------------------------------------------------------------------------------
1 |
13 | */
14 | protected $except = [
15 | 'current_password',
16 | 'password',
17 | 'password_confirmation',
18 | ];
19 | }
20 |
--------------------------------------------------------------------------------
/app/Http/Middleware/TrustHosts.php:
--------------------------------------------------------------------------------
1 |
13 | */
14 | public function hosts(): array
15 | {
16 | return [
17 | $this->allSubdomainsOfApplicationUrl(),
18 | ];
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/Http/Middleware/TrustProxies.php:
--------------------------------------------------------------------------------
1 | |string|null
14 | */
15 | protected $proxies;
16 |
17 | /**
18 | * The headers that should be used to detect proxies.
19 | *
20 | * @var int
21 | */
22 | protected $headers =
23 | Request::HEADER_X_FORWARDED_FOR |
24 | Request::HEADER_X_FORWARDED_HOST |
25 | Request::HEADER_X_FORWARDED_PORT |
26 | Request::HEADER_X_FORWARDED_PROTO |
27 | Request::HEADER_X_FORWARDED_AWS_ELB;
28 | }
29 |
--------------------------------------------------------------------------------
/app/Http/Middleware/ValidateSignature.php:
--------------------------------------------------------------------------------
1 |
13 | */
14 | protected $except = [
15 | // 'fbclid',
16 | // 'utm_campaign',
17 | // 'utm_content',
18 | // 'utm_medium',
19 | // 'utm_source',
20 | // 'utm_term',
21 | ];
22 | }
23 |
--------------------------------------------------------------------------------
/app/Http/Middleware/VerifyCsrfToken.php:
--------------------------------------------------------------------------------
1 | fileContents = $fileContents;
28 | $this->progressMessage = $progressMessage;
29 | }
30 |
31 | /**
32 | * Execute the job.
33 | *
34 | * @return void
35 | */
36 | public function handle()
37 | {
38 | Log::info('ProcessIpsJob started.');
39 | Log::info('File contents: ' . print_r($this->fileContents, true));
40 | Log::info('Progress message: ' . $this->progressMessage);
41 |
42 | // Instantiate DnsUpdateService within the handle method
43 | $dnsUpdateService = new DnsUpdateService(function ($message) {
44 | Log::info($message);
45 | });
46 |
47 | // Process the file content using DnsUpdateService
48 | $dnsUpdateService->processFileContent($this->fileContents, $this->progressMessage);
49 |
50 | Log::info('ProcessIpsJob completed.');
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/app/Models/Owner.php:
--------------------------------------------------------------------------------
1 | groupBy('server_id', 'inbound_id', 'client_id', 'date')
20 | ->get();
21 |
22 | foreach ($records as $record) {
23 | // Fetch duplicates
24 | $duplicates = self::where('server_id', $record->server_id)
25 | ->where('inbound_id', $record->inbound_id)
26 | ->where('client_id', $record->client_id)
27 | ->whereDate('created_at', $record->date)
28 | ->where('created_at', '<', $record->max_created_at)
29 | ->get();
30 |
31 | foreach ($duplicates as $duplicate) {
32 | try {
33 | $duplicate->delete(); // Delete each duplicate
34 | $deletedCount++;
35 | echo "Deleted record ID: {$duplicate->id}\n"; // Print deleted record ID
36 | sleep(1); // Introduce a slight delay
37 | } catch (\Exception $e) {
38 | echo "Error deleting record ID: {$duplicate->id}, Error: {$e->getMessage()}\n";
39 | }
40 | }
41 | }
42 |
43 | return $deletedCount;
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/app/Models/User.php:
--------------------------------------------------------------------------------
1 |
19 | */
20 | protected $fillable = [
21 | 'name',
22 | 'email',
23 | 'password',
24 | ];
25 |
26 | /**
27 | * The attributes that should be hidden for serialization.
28 | *
29 | * @var array
30 | */
31 | protected $hidden = [
32 | 'password',
33 | 'remember_token',
34 | ];
35 |
36 | /**
37 | * The attributes that should be cast.
38 | *
39 | * @var array
40 | */
41 | protected $casts = [
42 | 'email_verified_at' => 'datetime',
43 | 'password' => 'hashed',
44 | ];
45 | }
46 |
--------------------------------------------------------------------------------
/app/Policies/ServerPolicy.php:
--------------------------------------------------------------------------------
1 | status, ['ARCHIVED', 'DRAFT']);
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/app/Providers/AppServiceProvider.php:
--------------------------------------------------------------------------------
1 |
14 | */
15 | protected $policies = [
16 | //
17 | ];
18 |
19 | /**
20 | * Register any authentication / authorization services.
21 | */
22 | public function boot(): void
23 | {
24 | //
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Providers/BroadcastServiceProvider.php:
--------------------------------------------------------------------------------
1 | >
16 | */
17 | protected $listen = [
18 | Registered::class => [
19 | SendEmailVerificationNotification::class,
20 | ],
21 | ];
22 |
23 | /**
24 | * Register any events for your application.
25 | */
26 | public function boot(): void
27 | {
28 | //
29 | }
30 |
31 | /**
32 | * Determine if events and listeners should be automatically discovered.
33 | */
34 | public function shouldDiscoverEvents(): bool
35 | {
36 | return false;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/app/Providers/Filament/AdminPanelProvider.php:
--------------------------------------------------------------------------------
1 | default()
27 | ->id('admin')
28 | ->path('admin')
29 | ->login()
30 | ->colors([
31 | 'primary' => Color::Blue,
32 | ])
33 | ->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
34 | ->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
35 | ->pages([
36 | Pages\Dashboard::class,
37 | ])
38 | ->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
39 | ->widgets([
40 | Widgets\AccountWidget::class,
41 | ])
42 | ->sidebarCollapsibleOnDesktop()
43 | ->brandLogo(asset('xray.jpg'))
44 | ->middleware([
45 | EncryptCookies::class,
46 | AddQueuedCookiesToResponse::class,
47 | StartSession::class,
48 | AuthenticateSession::class,
49 | ShareErrorsFromSession::class,
50 | VerifyCsrfToken::class,
51 | SubstituteBindings::class,
52 | DisableBladeIconComponents::class,
53 | DispatchServingFilamentEvent::class,
54 | ])
55 | ->authMiddleware([
56 | Authenticate::class,
57 | ]);
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/app/Providers/RouteServiceProvider.php:
--------------------------------------------------------------------------------
1 | by($request->user()?->id ?: $request->ip());
29 | });
30 |
31 | $this->routes(function () {
32 | Route::middleware('api')
33 | ->prefix('api')
34 | ->group(base_path('routes/api.php'));
35 |
36 | Route::middleware('web')
37 | ->group(base_path('routes/web.php'));
38 | });
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/Services/CloudflareApiService.php:
--------------------------------------------------------------------------------
1 | setAccount($account);
17 | }
18 |
19 | public function setAccount($account)
20 | {
21 | $config = config("services.cloudflare.accounts.$account");
22 |
23 | if (!$config) {
24 | throw new \Exception("Cloudflare account configuration not found: $account");
25 | }
26 |
27 | $this->zoneId = $config['zone_id'];
28 | $this->apiKey = $config['api_key'];
29 | $this->email = $config['email'];
30 | }
31 |
32 | public function isConfiguredCorrectly()
33 | {
34 | return isset($this->zoneId) && isset($this->apiKey) && isset($this->email);
35 | }
36 |
37 | private function makeRequest($method, $endpoint, $data = [])
38 | {
39 | try {
40 | $response = Http::withHeaders([
41 | 'Authorization' => "Bearer {$this->apiKey}", // Ensure API key is used
42 | 'Content-Type' => 'application/json',
43 | ])->{$method}($this->apiUrl . $endpoint, $data);
44 |
45 | // Log the raw response for debugging
46 | //\Log::info('API Response', ['response' => $response->json()]);
47 |
48 | if ($response->failed()) {
49 | \Log::error('API Request Failed', [
50 | 'status' => $response->status(),
51 | 'body' => $response->body(),
52 | ]);
53 |
54 | // Decode the response body
55 | $responseBody = $response->json();
56 |
57 | // Return detailed error information
58 | return [
59 | 'success' => false,
60 | 'errors' => $responseBody['errors'] ?? [['message' => 'Unknown error']],
61 | 'messages' => $responseBody['messages'] ?? [],
62 | 'status' => $response->status(),
63 | ];
64 | }
65 |
66 | // Decode the response body to JSON array
67 | return $response->json();
68 | } catch (\Exception $e) {
69 | \Log::error('Exception during API request', [
70 | 'message' => $e->getMessage(),
71 | ]);
72 |
73 | // Return error details
74 | return [
75 | 'success' => false,
76 | 'errors' => [['message' => 'Exception occurred', 'details' => $e->getMessage()]],
77 | ];
78 | }
79 | }
80 |
81 | public function listDnsRecords()
82 | {
83 | $records = [];
84 | $page = 1;
85 | $perPage = 100;
86 |
87 | do {
88 | // Make the request with pagination
89 | $response = $this->makeRequest('get', "zones/{$this->zoneId}/dns_records", [
90 | 'page' => $page,
91 | 'per_page' => $perPage
92 | ]);
93 |
94 | if (!$response['success']) {
95 | return null;
96 | }
97 |
98 | // Merge the result from the current page into the records array
99 | $records = array_merge($records, $response['result']);
100 |
101 | // Check the result_info to determine if there are more pages
102 | $totalPages = $response['result_info']['total_pages'];
103 | $page++;
104 |
105 | } while ($page <= $totalPages);
106 |
107 | return $records;
108 | }
109 | public function getExistingDNSRecord($ip)
110 | {
111 | $dnsRecords = $this->listDnsRecords();
112 |
113 | if (!$dnsRecords) {
114 | return null;
115 | }
116 |
117 | foreach ($dnsRecords as $record) {
118 | if ($record['content'] === $ip) {
119 | return $record;
120 | }
121 | }
122 |
123 | return null;
124 | }
125 |
126 | public function addDnsRecord($name, $content, $ttl = 3600, $proxied = false)
127 | {
128 | // Determine the DNS record type based on the content (IPv4 or IPv6)
129 | if (filter_var($content, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
130 | $type = 'A';
131 | } elseif (filter_var($content, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
132 | $type = 'AAAA';
133 | } else {
134 | // Default to 'A' if not a valid IP, or handle as needed
135 | $type = 'A';
136 | }
137 | $data = [
138 | 'type' => $type,
139 | 'name' => $name,
140 | 'content' => $content,
141 | 'ttl' => $ttl,
142 | 'proxied' => $proxied,
143 | ];
144 |
145 | $response = $this->makeRequest('post', "zones/{$this->zoneId}/dns_records", $data);
146 |
147 | if (empty($response['success']) || !empty($response['errors'])) {
148 | \Log::error('Error adding DNS record', [
149 | 'response' => $response,
150 | ]);
151 | return null;
152 | }
153 |
154 | return $response['result'];
155 | }
156 |
157 | public function updateDnsRecord($recordId, $name, $content, $ttl = 3600, $proxied = false)
158 | {
159 | // Determine the DNS record type based on the content (IPv4 or IPv6)
160 | // Remove brackets if present and trim whitespace
161 | if (is_string($content)) {
162 | $content = trim($content, "[] \t\n\r\0\x0B");
163 | } elseif (is_array($content)) {
164 | $content = trim(reset($content), "[] \t\n\r\0\x0B");
165 | }
166 | if (filter_var($content, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
167 | $type = 'A';
168 | } elseif (filter_var($content, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
169 | $type = 'AAAA';
170 | } else {
171 | // Default to 'A' if not a valid IP, or handle as needed
172 | $type = 'A';
173 | }
174 | $data = [
175 | 'type' => $type,
176 | 'name' => $name,
177 | 'content' => $content,
178 | 'ttl' => $ttl,
179 | 'proxied' => $proxied,
180 | ];
181 |
182 | // Attempt to update the DNS record
183 | $response = $this->makeRequest('put', "zones/{$this->zoneId}/dns_records/{$recordId}", $data);
184 | // \Log::info('Cloudflare updateDnsRecord response', [
185 | // 'response' => $response,
186 | // ]);
187 | // Check if 'success' key is present
188 | if (!isset($response['success']) || !$response['success']) {
189 | $errorCode = $response['errors'][0]['code'] ?? 'Unknown Code';
190 | $errorMessage = $response['errors'][0]['message'] ?? 'Unknown Error';
191 |
192 | if ($errorCode === 81058) {
193 | // Record already exists, so delete it and retry the update
194 | $response = $this->makeRequest('delete', "zones/{$this->zoneId}/dns_records/{$recordId}");
195 |
196 | if (isset($response['errors'])) {
197 | \Log::error('Error deleting DNS record', [
198 | 'response' => $response,
199 | ]);
200 | return null;
201 | }
202 |
203 | // Retry the update after deletion
204 | // $response = $this->makeRequest('put', "zones/{$this->zoneId}/dns_records/{$recordId}", $data);
205 |
206 | // if (!isset($response['success']) || !$response['success']) {
207 | // \Log::error('Error updating DNS record after deletion', [
208 | // 'response' => $response,
209 | // ]);
210 | // return null;
211 | // }
212 | } else {
213 | \Log::error('Error updating DNS record', [
214 | 'response' => $response,
215 | ]);
216 | return null;
217 | }
218 | }
219 |
220 | return $response['result'];
221 | }
222 |
223 | public function deleteDnsRecord($recordId)
224 | {
225 | $response = $this->makeRequest('delete', "zones/{$this->zoneId}/dns_records/{$recordId}");
226 |
227 | if (empty($response['success']) || !empty($response['errors'])) {
228 | \Log::error('Error adding DNS record', [
229 | 'response' => $response,
230 | ]);
231 | return null;
232 | }
233 |
234 | return $response['result'];
235 | }
236 | }
--------------------------------------------------------------------------------
/artisan:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 | make(Illuminate\Contracts\Console\Kernel::class);
34 |
35 | $status = $kernel->handle(
36 | $input = new Symfony\Component\Console\Input\ArgvInput,
37 | new Symfony\Component\Console\Output\ConsoleOutput
38 | );
39 |
40 | /*
41 | |--------------------------------------------------------------------------
42 | | Shutdown The Application
43 | |--------------------------------------------------------------------------
44 | |
45 | | Once Artisan has finished running, we will fire off the shutdown events
46 | | so that any final work may be done by the application before we shut
47 | | down the process. This is the last thing to happen to the request.
48 | |
49 | */
50 |
51 | $kernel->terminate($input, $status);
52 |
53 | exit($status);
54 |
--------------------------------------------------------------------------------
/bootstrap/app.php:
--------------------------------------------------------------------------------
1 | singleton(
30 | Illuminate\Contracts\Http\Kernel::class,
31 | App\Http\Kernel::class
32 | );
33 |
34 | $app->singleton(
35 | Illuminate\Contracts\Console\Kernel::class,
36 | App\Console\Kernel::class
37 | );
38 |
39 | $app->singleton(
40 | Illuminate\Contracts\Debug\ExceptionHandler::class,
41 | App\Exceptions\Handler::class
42 | );
43 |
44 | /*
45 | |--------------------------------------------------------------------------
46 | | Return The Application
47 | |--------------------------------------------------------------------------
48 | |
49 | | This script returns the application instance. The instance is given to
50 | | the calling script so we can separate the building of the instances
51 | | from the actual running of the application and sending responses.
52 | |
53 | */
54 |
55 | return $app;
56 |
--------------------------------------------------------------------------------
/bootstrap/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "laravel/laravel",
3 | "type": "project",
4 | "description": "The skeleton application for the Laravel framework.",
5 | "keywords": [
6 | "laravel",
7 | "framework"
8 | ],
9 | "license": "MIT",
10 | "require": {
11 | "php": "^8.1",
12 | "alirezax5/check-host": "^1.0",
13 | "filament/filament": "^3.2",
14 | "google/apiclient": "^2.17",
15 | "guzzlehttp/guzzle": "^7.2",
16 | "irazasyed/telegram-bot-sdk": "^3.14",
17 | "laravel/framework": "^10.10",
18 | "laravel/sanctum": "^3.3",
19 | "laravel/tinker": "^2.8",
20 | "livewire/livewire": "^3.4",
21 | "yaza/laravel-google-drive-storage": "^2.0"
22 | },
23 | "require-dev": {
24 | "fakerphp/faker": "^1.9.1",
25 | "laravel/pint": "^1.0",
26 | "laravel/sail": "^1.18",
27 | "mockery/mockery": "^1.4.4",
28 | "nunomaduro/collision": "^7.0",
29 | "phpunit/phpunit": "^10.1",
30 | "spatie/laravel-ignition": "^2.4"
31 | },
32 | "autoload": {
33 | "psr-4": {
34 | "App\\": "app/",
35 | "Database\\Factories\\": "database/factories/",
36 | "Database\\Seeders\\": "database/seeders/"
37 | },
38 | "files": [
39 | "app/Services/SubHelper.php"
40 | ]
41 | },
42 | "autoload-dev": {
43 | "psr-4": {
44 | "Tests\\": "tests/"
45 | }
46 | },
47 | "scripts": {
48 | "post-autoload-dump": [
49 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
50 | "@php artisan package:discover --ansi",
51 | "@php artisan filament:upgrade"
52 | ],
53 | "post-update-cmd": [
54 | "@php artisan vendor:publish --tag=laravel-assets --ansi --force"
55 | ],
56 | "post-root-package-install": [
57 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
58 | ],
59 | "post-create-project-cmd": [
60 | "@php artisan key:generate --ansi"
61 | ]
62 | },
63 | "extra": {
64 | "laravel": {
65 | "dont-discover": []
66 | }
67 | },
68 | "config": {
69 | "optimize-autoloader": true,
70 | "preferred-install": "dist",
71 | "sort-packages": true,
72 | "allow-plugins": {
73 | "pestphp/pest-plugin": true,
74 | "php-http/discovery": true
75 | }
76 | },
77 | "minimum-stability": "stable",
78 | "prefer-stable": true
79 | }
80 |
--------------------------------------------------------------------------------
/config/app.php:
--------------------------------------------------------------------------------
1 | env('TELEGRAM_SERVERS_ADMIN_IDS', ''),
9 | 'skip_ips' => env('SKIP_IPS', ''),
10 |
11 | /*
12 | |--------------------------------------------------------------------------
13 | | Application Name
14 | |--------------------------------------------------------------------------
15 | |
16 | | This value is the name of your application. This value is used when the
17 | | framework needs to place the application's name in a notification or
18 | | any other location as required by the application or its packages.
19 | |
20 | */
21 |
22 | 'name' => env('APP_NAME', 'Laravel'),
23 |
24 | /*
25 | |--------------------------------------------------------------------------
26 | | Application Environment
27 | |--------------------------------------------------------------------------
28 | |
29 | | This value determines the "environment" your application is currently
30 | | running in. This may determine how you prefer to configure various
31 | | services the application utilizes. Set this in your ".env" file.
32 | |
33 | */
34 |
35 | 'env' => env('APP_ENV', 'production'),
36 |
37 | /*
38 | |--------------------------------------------------------------------------
39 | | Application Debug Mode
40 | |--------------------------------------------------------------------------
41 | |
42 | | When your application is in debug mode, detailed error messages with
43 | | stack traces will be shown on every error that occurs within your
44 | | application. If disabled, a simple generic error page is shown.
45 | |
46 | */
47 |
48 | 'debug' => (bool) env('APP_DEBUG', false),
49 |
50 | /*
51 | |--------------------------------------------------------------------------
52 | | Application URL
53 | |--------------------------------------------------------------------------
54 | |
55 | | This URL is used by the console to properly generate URLs when using
56 | | the Artisan command line tool. You should set this to the root of
57 | | your application so that it is used when running Artisan tasks.
58 | |
59 | */
60 |
61 | 'url' => env('APP_URL', 'http://localhost'),
62 |
63 | 'asset_url' => env('ASSET_URL'),
64 |
65 | /*
66 | |--------------------------------------------------------------------------
67 | | Application Timezone
68 | |--------------------------------------------------------------------------
69 | |
70 | | Here you may specify the default timezone for your application, which
71 | | will be used by the PHP date and date-time functions. We have gone
72 | | ahead and set this to a sensible default for you out of the box.
73 | |
74 | */
75 |
76 | 'timezone' => 'UTC',
77 |
78 | /*
79 | |--------------------------------------------------------------------------
80 | | Application Locale Configuration
81 | |--------------------------------------------------------------------------
82 | |
83 | | The application locale determines the default locale that will be used
84 | | by the translation service provider. You are free to set this value
85 | | to any of the locales which will be supported by the application.
86 | |
87 | */
88 |
89 | 'locale' => 'en',
90 |
91 | /*
92 | |--------------------------------------------------------------------------
93 | | Application Fallback Locale
94 | |--------------------------------------------------------------------------
95 | |
96 | | The fallback locale determines the locale to use when the current one
97 | | is not available. You may change the value to correspond to any of
98 | | the language folders that are provided through your application.
99 | |
100 | */
101 |
102 | 'fallback_locale' => 'en',
103 |
104 | /*
105 | |--------------------------------------------------------------------------
106 | | Faker Locale
107 | |--------------------------------------------------------------------------
108 | |
109 | | This locale will be used by the Faker PHP library when generating fake
110 | | data for your database seeds. For example, this will be used to get
111 | | localized telephone numbers, street address information and more.
112 | |
113 | */
114 |
115 | 'faker_locale' => 'en_US',
116 |
117 | /*
118 | |--------------------------------------------------------------------------
119 | | Encryption Key
120 | |--------------------------------------------------------------------------
121 | |
122 | | This key is used by the Illuminate encrypter service and should be set
123 | | to a random, 32 character string, otherwise these encrypted strings
124 | | will not be safe. Please do this before deploying an application!
125 | |
126 | */
127 |
128 | 'key' => env('APP_KEY'),
129 |
130 | 'cipher' => 'AES-256-CBC',
131 |
132 | /*
133 | |--------------------------------------------------------------------------
134 | | Maintenance Mode Driver
135 | |--------------------------------------------------------------------------
136 | |
137 | | These configuration options determine the driver used to determine and
138 | | manage Laravel's "maintenance mode" status. The "cache" driver will
139 | | allow maintenance mode to be controlled across multiple machines.
140 | |
141 | | Supported drivers: "file", "cache"
142 | |
143 | */
144 |
145 | 'maintenance' => [
146 | 'driver' => 'file',
147 | // 'store' => 'redis',
148 | ],
149 |
150 | /*
151 | |--------------------------------------------------------------------------
152 | | Autoloaded Service Providers
153 | |--------------------------------------------------------------------------
154 | |
155 | | The service providers listed here will be automatically loaded on the
156 | | request to your application. Feel free to add your own services to
157 | | this array to grant expanded functionality to your applications.
158 | |
159 | */
160 |
161 | 'providers' => ServiceProvider::defaultProviders()->merge([
162 | /*
163 | * Package Service Providers...
164 | */
165 |
166 | /*
167 | * Application Service Providers...
168 | */
169 | App\Providers\AppServiceProvider::class,
170 | App\Providers\AuthServiceProvider::class,
171 | // App\Providers\BroadcastServiceProvider::class,
172 | App\Providers\EventServiceProvider::class,
173 | App\Providers\Filament\AdminPanelProvider::class,
174 | App\Providers\RouteServiceProvider::class,
175 | ])->toArray(),
176 |
177 | /*
178 | |--------------------------------------------------------------------------
179 | | Class Aliases
180 | |--------------------------------------------------------------------------
181 | |
182 | | This array of class aliases will be registered when this application
183 | | is started. However, feel free to register as many as you wish as
184 | | the aliases are "lazy" loaded so they don't hinder performance.
185 | |
186 | */
187 |
188 | 'aliases' => Facade::defaultAliases()->merge([
189 | // 'Example' => App\Facades\Example::class,
190 | ])->toArray(),
191 |
192 | ];
193 |
--------------------------------------------------------------------------------
/config/auth.php:
--------------------------------------------------------------------------------
1 | [
17 | 'guard' => 'web',
18 | 'passwords' => 'users',
19 | ],
20 |
21 | /*
22 | |--------------------------------------------------------------------------
23 | | Authentication Guards
24 | |--------------------------------------------------------------------------
25 | |
26 | | Next, you may define every authentication guard for your application.
27 | | Of course, a great default configuration has been defined for you
28 | | here which uses session storage and the Eloquent user provider.
29 | |
30 | | All authentication drivers have a user provider. This defines how the
31 | | users are actually retrieved out of your database or other storage
32 | | mechanisms used by this application to persist your user's data.
33 | |
34 | | Supported: "session"
35 | |
36 | */
37 |
38 | 'guards' => [
39 | 'web' => [
40 | 'driver' => 'session',
41 | 'provider' => 'users',
42 | ],
43 | ],
44 |
45 | /*
46 | |--------------------------------------------------------------------------
47 | | User Providers
48 | |--------------------------------------------------------------------------
49 | |
50 | | All authentication drivers have a user provider. This defines how the
51 | | users are actually retrieved out of your database or other storage
52 | | mechanisms used by this application to persist your user's data.
53 | |
54 | | If you have multiple user tables or models you may configure multiple
55 | | sources which represent each model / table. These sources may then
56 | | be assigned to any extra authentication guards you have defined.
57 | |
58 | | Supported: "database", "eloquent"
59 | |
60 | */
61 |
62 | 'providers' => [
63 | 'users' => [
64 | 'driver' => 'eloquent',
65 | 'model' => App\Models\User::class,
66 | ],
67 |
68 | // 'users' => [
69 | // 'driver' => 'database',
70 | // 'table' => 'users',
71 | // ],
72 | ],
73 |
74 | /*
75 | |--------------------------------------------------------------------------
76 | | Resetting Passwords
77 | |--------------------------------------------------------------------------
78 | |
79 | | You may specify multiple password reset configurations if you have more
80 | | than one user table or model in the application and you want to have
81 | | separate password reset settings based on the specific user types.
82 | |
83 | | The expiry time is the number of minutes that each reset token will be
84 | | considered valid. This security feature keeps tokens short-lived so
85 | | they have less time to be guessed. You may change this as needed.
86 | |
87 | | The throttle setting is the number of seconds a user must wait before
88 | | generating more password reset tokens. This prevents the user from
89 | | quickly generating a very large amount of password reset tokens.
90 | |
91 | */
92 |
93 | 'passwords' => [
94 | 'users' => [
95 | 'provider' => 'users',
96 | 'table' => 'password_reset_tokens',
97 | 'expire' => 60,
98 | 'throttle' => 60,
99 | ],
100 | ],
101 |
102 | /*
103 | |--------------------------------------------------------------------------
104 | | Password Confirmation Timeout
105 | |--------------------------------------------------------------------------
106 | |
107 | | Here you may define the amount of seconds before a password confirmation
108 | | times out and the user is prompted to re-enter their password via the
109 | | confirmation screen. By default, the timeout lasts for three hours.
110 | |
111 | */
112 |
113 | 'password_timeout' => 10800,
114 |
115 | ];
116 |
--------------------------------------------------------------------------------
/config/broadcasting.php:
--------------------------------------------------------------------------------
1 | env('BROADCAST_DRIVER', 'null'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Broadcast Connections
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may define all of the broadcast connections that will be used
26 | | to broadcast events to other systems or over websockets. Samples of
27 | | each available type of connection are provided inside this array.
28 | |
29 | */
30 |
31 | 'connections' => [
32 |
33 | 'pusher' => [
34 | 'driver' => 'pusher',
35 | 'key' => env('PUSHER_APP_KEY'),
36 | 'secret' => env('PUSHER_APP_SECRET'),
37 | 'app_id' => env('PUSHER_APP_ID'),
38 | 'options' => [
39 | 'cluster' => env('PUSHER_APP_CLUSTER'),
40 | 'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com',
41 | 'port' => env('PUSHER_PORT', 443),
42 | 'scheme' => env('PUSHER_SCHEME', 'https'),
43 | 'encrypted' => true,
44 | 'useTLS' => env('PUSHER_SCHEME', 'https') === 'https',
45 | ],
46 | 'client_options' => [
47 | // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
48 | ],
49 | ],
50 |
51 | 'ably' => [
52 | 'driver' => 'ably',
53 | 'key' => env('ABLY_KEY'),
54 | ],
55 |
56 | 'redis' => [
57 | 'driver' => 'redis',
58 | 'connection' => 'default',
59 | ],
60 |
61 | 'log' => [
62 | 'driver' => 'log',
63 | ],
64 |
65 | 'null' => [
66 | 'driver' => 'null',
67 | ],
68 |
69 | ],
70 |
71 | ];
72 |
--------------------------------------------------------------------------------
/config/cache.php:
--------------------------------------------------------------------------------
1 | env('CACHE_DRIVER', 'file'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Cache Stores
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may define all of the cache "stores" for your application as
26 | | well as their drivers. You may even define multiple stores for the
27 | | same cache driver to group types of items stored in your caches.
28 | |
29 | | Supported drivers: "apc", "array", "database", "file",
30 | | "memcached", "redis", "dynamodb", "octane", "null"
31 | |
32 | */
33 |
34 | 'stores' => [
35 |
36 | 'apc' => [
37 | 'driver' => 'apc',
38 | ],
39 |
40 | 'array' => [
41 | 'driver' => 'array',
42 | 'serialize' => false,
43 | ],
44 |
45 | 'database' => [
46 | 'driver' => 'database',
47 | 'table' => 'cache',
48 | 'connection' => null,
49 | 'lock_connection' => null,
50 | ],
51 |
52 | 'file' => [
53 | 'driver' => 'file',
54 | 'path' => storage_path('framework/cache/data'),
55 | 'lock_path' => storage_path('framework/cache/data'),
56 | ],
57 |
58 | 'memcached' => [
59 | 'driver' => 'memcached',
60 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
61 | 'sasl' => [
62 | env('MEMCACHED_USERNAME'),
63 | env('MEMCACHED_PASSWORD'),
64 | ],
65 | 'options' => [
66 | // Memcached::OPT_CONNECT_TIMEOUT => 2000,
67 | ],
68 | 'servers' => [
69 | [
70 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'),
71 | 'port' => env('MEMCACHED_PORT', 11211),
72 | 'weight' => 100,
73 | ],
74 | ],
75 | ],
76 |
77 | 'redis' => [
78 | 'driver' => 'redis',
79 | 'connection' => 'cache',
80 | 'lock_connection' => 'default',
81 | ],
82 |
83 | 'dynamodb' => [
84 | 'driver' => 'dynamodb',
85 | 'key' => env('AWS_ACCESS_KEY_ID'),
86 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
87 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
88 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
89 | 'endpoint' => env('DYNAMODB_ENDPOINT'),
90 | ],
91 |
92 | 'octane' => [
93 | 'driver' => 'octane',
94 | ],
95 |
96 | ],
97 |
98 | /*
99 | |--------------------------------------------------------------------------
100 | | Cache Key Prefix
101 | |--------------------------------------------------------------------------
102 | |
103 | | When utilizing the APC, database, memcached, Redis, or DynamoDB cache
104 | | stores there might be other applications using the same cache. For
105 | | that reason, you may prefix every cache key to avoid collisions.
106 | |
107 | */
108 |
109 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'),
110 |
111 | ];
112 |
--------------------------------------------------------------------------------
/config/cors.php:
--------------------------------------------------------------------------------
1 | ['api/*', 'sanctum/csrf-cookie'],
19 |
20 | 'allowed_methods' => ['*'],
21 |
22 | 'allowed_origins' => ['*'],
23 |
24 | 'allowed_origins_patterns' => [],
25 |
26 | 'allowed_headers' => ['*'],
27 |
28 | 'exposed_headers' => [],
29 |
30 | 'max_age' => 0,
31 |
32 | 'supports_credentials' => false,
33 |
34 | ];
35 |
--------------------------------------------------------------------------------
/config/database.php:
--------------------------------------------------------------------------------
1 | env('DB_CONNECTION', 'mysql'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Database Connections
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here are each of the database connections setup for your application.
26 | | Of course, examples of configuring each database platform that is
27 | | supported by Laravel is shown below to make development simple.
28 | |
29 | |
30 | | All database work in Laravel is done through the PHP PDO facilities
31 | | so make sure you have the driver for your particular database of
32 | | choice installed on your machine before you begin development.
33 | |
34 | */
35 |
36 | 'connections' => [
37 |
38 | 'sqlite' => [
39 | 'driver' => 'sqlite',
40 | 'url' => env('DATABASE_URL'),
41 | 'database' => env('DB_DATABASE', database_path('database.sqlite')),
42 | 'prefix' => '',
43 | 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
44 | ],
45 |
46 | 'mysql' => [
47 | 'driver' => 'mysql',
48 | 'url' => env('DATABASE_URL'),
49 | 'host' => env('DB_HOST', '127.0.0.1'),
50 | 'port' => env('DB_PORT', '3306'),
51 | 'database' => env('DB_DATABASE', 'forge'),
52 | 'username' => env('DB_USERNAME', 'forge'),
53 | 'password' => env('DB_PASSWORD', ''),
54 | 'unix_socket' => env('DB_SOCKET', ''),
55 | 'charset' => 'utf8mb4',
56 | 'collation' => 'utf8mb4_unicode_ci',
57 | 'prefix' => '',
58 | 'prefix_indexes' => true,
59 | 'strict' => true,
60 | 'engine' => null,
61 | 'options' => extension_loaded('pdo_mysql') ? array_filter([
62 | PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
63 | ]) : [],
64 | ],
65 |
66 | 'pgsql' => [
67 | 'driver' => 'pgsql',
68 | 'url' => env('DATABASE_URL'),
69 | 'host' => env('DB_HOST', '127.0.0.1'),
70 | 'port' => env('DB_PORT', '5432'),
71 | 'database' => env('DB_DATABASE', 'forge'),
72 | 'username' => env('DB_USERNAME', 'forge'),
73 | 'password' => env('DB_PASSWORD', ''),
74 | 'charset' => 'utf8',
75 | 'prefix' => '',
76 | 'prefix_indexes' => true,
77 | 'search_path' => 'public',
78 | 'sslmode' => 'prefer',
79 | ],
80 |
81 | 'sqlsrv' => [
82 | 'driver' => 'sqlsrv',
83 | 'url' => env('DATABASE_URL'),
84 | 'host' => env('DB_HOST', 'localhost'),
85 | 'port' => env('DB_PORT', '1433'),
86 | 'database' => env('DB_DATABASE', 'forge'),
87 | 'username' => env('DB_USERNAME', 'forge'),
88 | 'password' => env('DB_PASSWORD', ''),
89 | 'charset' => 'utf8',
90 | 'prefix' => '',
91 | 'prefix_indexes' => true,
92 | // 'encrypt' => env('DB_ENCRYPT', 'yes'),
93 | // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),
94 | ],
95 |
96 | ],
97 |
98 | /*
99 | |--------------------------------------------------------------------------
100 | | Migration Repository Table
101 | |--------------------------------------------------------------------------
102 | |
103 | | This table keeps track of all the migrations that have already run for
104 | | your application. Using this information, we can determine which of
105 | | the migrations on disk haven't actually been run in the database.
106 | |
107 | */
108 |
109 | 'migrations' => 'migrations',
110 |
111 | /*
112 | |--------------------------------------------------------------------------
113 | | Redis Databases
114 | |--------------------------------------------------------------------------
115 | |
116 | | Redis is an open source, fast, and advanced key-value store that also
117 | | provides a richer body of commands than a typical key-value system
118 | | such as APC or Memcached. Laravel makes it easy to dig right in.
119 | |
120 | */
121 |
122 | 'redis' => [
123 |
124 | 'client' => env('REDIS_CLIENT', 'phpredis'),
125 |
126 | 'options' => [
127 | 'cluster' => env('REDIS_CLUSTER', 'redis'),
128 | 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
129 | ],
130 |
131 | 'default' => [
132 | 'url' => env('REDIS_URL'),
133 | 'host' => env('REDIS_HOST', '127.0.0.1'),
134 | 'username' => env('REDIS_USERNAME'),
135 | 'password' => env('REDIS_PASSWORD'),
136 | 'port' => env('REDIS_PORT', '6379'),
137 | 'database' => env('REDIS_DB', '0'),
138 | ],
139 |
140 | 'cache' => [
141 | 'url' => env('REDIS_URL'),
142 | 'host' => env('REDIS_HOST', '127.0.0.1'),
143 | 'username' => env('REDIS_USERNAME'),
144 | 'password' => env('REDIS_PASSWORD'),
145 | 'port' => env('REDIS_PORT', '6379'),
146 | 'database' => env('REDIS_CACHE_DB', '1'),
147 | ],
148 |
149 | ],
150 |
151 | ];
152 |
--------------------------------------------------------------------------------
/config/filesystems.php:
--------------------------------------------------------------------------------
1 | env('FILESYSTEM_DISK', 'local'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Filesystem Disks
21 | |--------------------------------------------------------------------------
22 | |
23 | | Here you may configure as many filesystem "disks" as you wish, and you
24 | | may even configure multiple disks of the same driver. Defaults have
25 | | been set up for each driver as an example of the required values.
26 | |
27 | | Supported Drivers: "local", "ftp", "sftp", "s3"
28 | |
29 | */
30 |
31 | 'disks' => [
32 |
33 | 'local' => [
34 | 'driver' => 'local',
35 | 'root' => storage_path('app'),
36 | 'throw' => false,
37 | ],
38 |
39 | 'public' => [
40 | 'driver' => 'local',
41 | 'root' => storage_path('app/public'),
42 | 'url' => env('APP_URL').'/storage',
43 | 'visibility' => 'public',
44 | 'throw' => false,
45 | ],
46 |
47 | 's3' => [
48 | 'driver' => 's3',
49 | 'key' => env('AWS_ACCESS_KEY_ID'),
50 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
51 | 'region' => env('AWS_DEFAULT_REGION'),
52 | 'bucket' => env('AWS_BUCKET'),
53 | 'url' => env('AWS_URL'),
54 | 'endpoint' => env('AWS_ENDPOINT'),
55 | 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
56 | 'throw' => false,
57 | ],
58 |
59 | 'google' => [
60 | 'driver' => 'google',
61 | 'clientId' => env('GOOGLE_DRIVE_CLIENT_ID'),
62 | 'clientSecret' => env('GOOGLE_DRIVE_CLIENT_SECRET'),
63 | 'refreshToken' => env('GOOGLE_DRIVE_REFRESH_TOKEN'),
64 | 'folder' => env('GOOGLE_DRIVE_FOLDER'),
65 | ]
66 | ],
67 |
68 | /*
69 | |--------------------------------------------------------------------------
70 | | Symbolic Links
71 | |--------------------------------------------------------------------------
72 | |
73 | | Here you may configure the symbolic links that will be created when the
74 | | `storage:link` Artisan command is executed. The array keys should be
75 | | the locations of the links and the values should be their targets.
76 | |
77 | */
78 |
79 | 'links' => [
80 | public_path('storage') => storage_path('app/public'),
81 | ],
82 |
83 | ];
84 |
--------------------------------------------------------------------------------
/config/hashing.php:
--------------------------------------------------------------------------------
1 | 'bcrypt',
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Bcrypt Options
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may specify the configuration options that should be used when
26 | | passwords are hashed using the Bcrypt algorithm. This will allow you
27 | | to control the amount of time it takes to hash the given password.
28 | |
29 | */
30 |
31 | 'bcrypt' => [
32 | 'rounds' => env('BCRYPT_ROUNDS', 12),
33 | 'verify' => true,
34 | ],
35 |
36 | /*
37 | |--------------------------------------------------------------------------
38 | | Argon Options
39 | |--------------------------------------------------------------------------
40 | |
41 | | Here you may specify the configuration options that should be used when
42 | | passwords are hashed using the Argon algorithm. These will allow you
43 | | to control the amount of time it takes to hash the given password.
44 | |
45 | */
46 |
47 | 'argon' => [
48 | 'memory' => 65536,
49 | 'threads' => 1,
50 | 'time' => 4,
51 | 'verify' => true,
52 | ],
53 |
54 | ];
55 |
--------------------------------------------------------------------------------
/config/logging.php:
--------------------------------------------------------------------------------
1 | env('LOG_CHANNEL', 'stack'),
22 |
23 | /*
24 | |--------------------------------------------------------------------------
25 | | Deprecations Log Channel
26 | |--------------------------------------------------------------------------
27 | |
28 | | This option controls the log channel that should be used to log warnings
29 | | regarding deprecated PHP and library features. This allows you to get
30 | | your application ready for upcoming major versions of dependencies.
31 | |
32 | */
33 |
34 | 'deprecations' => [
35 | 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
36 | 'trace' => false,
37 | ],
38 |
39 | /*
40 | |--------------------------------------------------------------------------
41 | | Log Channels
42 | |--------------------------------------------------------------------------
43 | |
44 | | Here you may configure the log channels for your application. Out of
45 | | the box, Laravel uses the Monolog PHP logging library. This gives
46 | | you a variety of powerful log handlers / formatters to utilize.
47 | |
48 | | Available Drivers: "single", "daily", "slack", "syslog",
49 | | "errorlog", "monolog",
50 | | "custom", "stack"
51 | |
52 | */
53 |
54 | 'channels' => [
55 | 'stack' => [
56 | 'driver' => 'stack',
57 | 'channels' => ['single'],
58 | 'ignore_exceptions' => false,
59 | ],
60 |
61 | 'single' => [
62 | 'driver' => 'single',
63 | 'path' => storage_path('logs/laravel.log'),
64 | 'level' => env('LOG_LEVEL', 'debug'),
65 | 'replace_placeholders' => true,
66 | ],
67 |
68 | 'daily' => [
69 | 'driver' => 'daily',
70 | 'path' => storage_path('logs/laravel.log'),
71 | 'level' => env('LOG_LEVEL', 'debug'),
72 | 'days' => 14,
73 | 'replace_placeholders' => true,
74 | ],
75 |
76 | 'slack' => [
77 | 'driver' => 'slack',
78 | 'url' => env('LOG_SLACK_WEBHOOK_URL'),
79 | 'username' => 'Laravel Log',
80 | 'emoji' => ':boom:',
81 | 'level' => env('LOG_LEVEL', 'critical'),
82 | 'replace_placeholders' => true,
83 | ],
84 |
85 | 'papertrail' => [
86 | 'driver' => 'monolog',
87 | 'level' => env('LOG_LEVEL', 'debug'),
88 | 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
89 | 'handler_with' => [
90 | 'host' => env('PAPERTRAIL_URL'),
91 | 'port' => env('PAPERTRAIL_PORT'),
92 | 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
93 | ],
94 | 'processors' => [PsrLogMessageProcessor::class],
95 | ],
96 |
97 | 'stderr' => [
98 | 'driver' => 'monolog',
99 | 'level' => env('LOG_LEVEL', 'debug'),
100 | 'handler' => StreamHandler::class,
101 | 'formatter' => env('LOG_STDERR_FORMATTER'),
102 | 'with' => [
103 | 'stream' => 'php://stderr',
104 | ],
105 | 'processors' => [PsrLogMessageProcessor::class],
106 | ],
107 |
108 | 'syslog' => [
109 | 'driver' => 'syslog',
110 | 'level' => env('LOG_LEVEL', 'debug'),
111 | 'facility' => LOG_USER,
112 | 'replace_placeholders' => true,
113 | ],
114 |
115 | 'errorlog' => [
116 | 'driver' => 'errorlog',
117 | 'level' => env('LOG_LEVEL', 'debug'),
118 | 'replace_placeholders' => true,
119 | ],
120 |
121 | 'null' => [
122 | 'driver' => 'monolog',
123 | 'handler' => NullHandler::class,
124 | ],
125 |
126 | 'emergency' => [
127 | 'path' => storage_path('logs/laravel.log'),
128 | ],
129 | ],
130 |
131 | ];
132 |
--------------------------------------------------------------------------------
/config/mail.php:
--------------------------------------------------------------------------------
1 | env('MAIL_MAILER', 'smtp'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Mailer Configurations
21 | |--------------------------------------------------------------------------
22 | |
23 | | Here you may configure all of the mailers used by your application plus
24 | | their respective settings. Several examples have been configured for
25 | | you and you are free to add your own as your application requires.
26 | |
27 | | Laravel supports a variety of mail "transport" drivers to be used while
28 | | sending an e-mail. You will specify which one you are using for your
29 | | mailers below. You are free to add additional mailers as required.
30 | |
31 | | Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2",
32 | | "postmark", "log", "array", "failover", "roundrobin"
33 | |
34 | */
35 |
36 | 'mailers' => [
37 | 'smtp' => [
38 | 'transport' => 'smtp',
39 | 'url' => env('MAIL_URL'),
40 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
41 | 'port' => env('MAIL_PORT', 587),
42 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'),
43 | 'username' => env('MAIL_USERNAME'),
44 | 'password' => env('MAIL_PASSWORD'),
45 | 'timeout' => null,
46 | 'local_domain' => env('MAIL_EHLO_DOMAIN'),
47 | ],
48 |
49 | 'ses' => [
50 | 'transport' => 'ses',
51 | ],
52 |
53 | 'postmark' => [
54 | 'transport' => 'postmark',
55 | // 'message_stream_id' => null,
56 | // 'client' => [
57 | // 'timeout' => 5,
58 | // ],
59 | ],
60 |
61 | 'mailgun' => [
62 | 'transport' => 'mailgun',
63 | // 'client' => [
64 | // 'timeout' => 5,
65 | // ],
66 | ],
67 |
68 | 'sendmail' => [
69 | 'transport' => 'sendmail',
70 | 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
71 | ],
72 |
73 | 'log' => [
74 | 'transport' => 'log',
75 | 'channel' => env('MAIL_LOG_CHANNEL'),
76 | ],
77 |
78 | 'array' => [
79 | 'transport' => 'array',
80 | ],
81 |
82 | 'failover' => [
83 | 'transport' => 'failover',
84 | 'mailers' => [
85 | 'smtp',
86 | 'log',
87 | ],
88 | ],
89 |
90 | 'roundrobin' => [
91 | 'transport' => 'roundrobin',
92 | 'mailers' => [
93 | 'ses',
94 | 'postmark',
95 | ],
96 | ],
97 | ],
98 |
99 | /*
100 | |--------------------------------------------------------------------------
101 | | Global "From" Address
102 | |--------------------------------------------------------------------------
103 | |
104 | | You may wish for all e-mails sent by your application to be sent from
105 | | the same address. Here, you may specify a name and address that is
106 | | used globally for all e-mails that are sent by your application.
107 | |
108 | */
109 |
110 | 'from' => [
111 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
112 | 'name' => env('MAIL_FROM_NAME', 'Example'),
113 | ],
114 |
115 | /*
116 | |--------------------------------------------------------------------------
117 | | Markdown Mail Settings
118 | |--------------------------------------------------------------------------
119 | |
120 | | If you are using Markdown based email rendering, you may configure your
121 | | theme and component paths here, allowing you to customize the design
122 | | of the emails. Or, you may simply stick with the Laravel defaults!
123 | |
124 | */
125 |
126 | 'markdown' => [
127 | 'theme' => 'default',
128 |
129 | 'paths' => [
130 | resource_path('views/vendor/mail'),
131 | ],
132 | ],
133 |
134 | ];
135 |
--------------------------------------------------------------------------------
/config/queue.php:
--------------------------------------------------------------------------------
1 | env('QUEUE_CONNECTION', 'sync'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Queue Connections
21 | |--------------------------------------------------------------------------
22 | |
23 | | Here you may configure the connection information for each server that
24 | | is used by your application. A default configuration has been added
25 | | for each back-end shipped with Laravel. You are free to add more.
26 | |
27 | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
28 | |
29 | */
30 |
31 | 'connections' => [
32 |
33 | 'sync' => [
34 | 'driver' => 'sync',
35 | ],
36 |
37 | 'database' => [
38 | 'driver' => 'database',
39 | 'table' => 'jobs',
40 | 'queue' => 'default',
41 | 'retry_after' => 900,
42 | 'after_commit' => false,
43 | 'timeout' => 900,
44 | ],
45 |
46 | 'beanstalkd' => [
47 | 'driver' => 'beanstalkd',
48 | 'host' => 'localhost',
49 | 'queue' => 'default',
50 | 'retry_after' => 90,
51 | 'block_for' => 0,
52 | 'after_commit' => false,
53 | ],
54 |
55 | 'sqs' => [
56 | 'driver' => 'sqs',
57 | 'key' => env('AWS_ACCESS_KEY_ID'),
58 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
59 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
60 | 'queue' => env('SQS_QUEUE', 'default'),
61 | 'suffix' => env('SQS_SUFFIX'),
62 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
63 | 'after_commit' => false,
64 | ],
65 |
66 | 'redis' => [
67 | 'driver' => 'redis',
68 | 'connection' => 'default',
69 | 'queue' => env('REDIS_QUEUE', 'default'),
70 | 'retry_after' => 90,
71 | 'block_for' => null,
72 | 'after_commit' => false,
73 | ],
74 |
75 | ],
76 |
77 | /*
78 | |--------------------------------------------------------------------------
79 | | Job Batching
80 | |--------------------------------------------------------------------------
81 | |
82 | | The following options configure the database and table that store job
83 | | batching information. These options can be updated to any database
84 | | connection and table which has been defined by your application.
85 | |
86 | */
87 |
88 | 'batching' => [
89 | 'database' => env('DB_CONNECTION', 'mysql'),
90 | 'table' => 'job_batches',
91 | ],
92 |
93 | /*
94 | |--------------------------------------------------------------------------
95 | | Failed Queue Jobs
96 | |--------------------------------------------------------------------------
97 | |
98 | | These options configure the behavior of failed queue job logging so you
99 | | can control which database and table are used to store the jobs that
100 | | have failed. You may change them to any database / table you wish.
101 | |
102 | */
103 |
104 | 'failed' => [
105 | 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
106 | 'database' => env('DB_CONNECTION', 'mysql'),
107 | 'table' => 'failed_jobs',
108 | ],
109 |
110 | ];
111 |
--------------------------------------------------------------------------------
/config/sanctum.php:
--------------------------------------------------------------------------------
1 | explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf(
19 | '%s%s',
20 | 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1',
21 | Sanctum::currentApplicationUrlWithPort()
22 | ))),
23 |
24 | /*
25 | |--------------------------------------------------------------------------
26 | | Sanctum Guards
27 | |--------------------------------------------------------------------------
28 | |
29 | | This array contains the authentication guards that will be checked when
30 | | Sanctum is trying to authenticate a request. If none of these guards
31 | | are able to authenticate the request, Sanctum will use the bearer
32 | | token that's present on an incoming request for authentication.
33 | |
34 | */
35 |
36 | 'guard' => ['web'],
37 |
38 | /*
39 | |--------------------------------------------------------------------------
40 | | Expiration Minutes
41 | |--------------------------------------------------------------------------
42 | |
43 | | This value controls the number of minutes until an issued token will be
44 | | considered expired. This will override any values set in the token's
45 | | "expires_at" attribute, but first-party sessions are not affected.
46 | |
47 | */
48 |
49 | 'expiration' => null,
50 |
51 | /*
52 | |--------------------------------------------------------------------------
53 | | Token Prefix
54 | |--------------------------------------------------------------------------
55 | |
56 | | Sanctum can prefix new tokens in order to take advantage of numerous
57 | | security scanning initiatives maintained by open source platforms
58 | | that notify developers if they commit tokens into repositories.
59 | |
60 | | See: https://docs.github.com/en/code-security/secret-scanning/about-secret-scanning
61 | |
62 | */
63 |
64 | 'token_prefix' => env('SANCTUM_TOKEN_PREFIX', ''),
65 |
66 | /*
67 | |--------------------------------------------------------------------------
68 | | Sanctum Middleware
69 | |--------------------------------------------------------------------------
70 | |
71 | | When authenticating your first-party SPA with Sanctum you may need to
72 | | customize some of the middleware Sanctum uses while processing the
73 | | request. You may change the middleware listed below as required.
74 | |
75 | */
76 |
77 | 'middleware' => [
78 | 'authenticate_session' => Laravel\Sanctum\Http\Middleware\AuthenticateSession::class,
79 | 'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class,
80 | 'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class,
81 | ],
82 |
83 | ];
84 |
--------------------------------------------------------------------------------
/config/services.php:
--------------------------------------------------------------------------------
1 | [
18 | 'domain' => env('MAILGUN_DOMAIN'),
19 | 'secret' => env('MAILGUN_SECRET'),
20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
21 | 'scheme' => 'https',
22 | ],
23 |
24 | 'postmark' => [
25 | 'token' => env('POSTMARK_TOKEN'),
26 | ],
27 |
28 | 'ses' => [
29 | 'key' => env('AWS_ACCESS_KEY_ID'),
30 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
31 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
32 | ],
33 | 'cloudflare' => [
34 | 'accounts' => [
35 | 'com' => [
36 | 'api_key' => env('CLOUDFLARE_API_KEY_I_COM'),
37 | 'email' => env('CLOUDFLARE_EMAIL_I_COM'),
38 | 'zone_id' => env('CLOUDFLARE_ZONE_ID_I_COM'),
39 | ],
40 | 'org' => [
41 | 'api_key' => env('CLOUDFLARE_API_KEY_I_ORG'),
42 | 'email' => env('CLOUDFLARE_EMAIL_I_ORG'),
43 | 'zone_id' => env('CLOUDFLARE_ZONE_ID_I_ORG'),
44 | ],
45 | ],
46 | ],
47 |
48 | ];
49 |
--------------------------------------------------------------------------------
/config/session.php:
--------------------------------------------------------------------------------
1 | env('SESSION_DRIVER', 'file'),
22 |
23 | /*
24 | |--------------------------------------------------------------------------
25 | | Session Lifetime
26 | |--------------------------------------------------------------------------
27 | |
28 | | Here you may specify the number of minutes that you wish the session
29 | | to be allowed to remain idle before it expires. If you want them
30 | | to immediately expire on the browser closing, set that option.
31 | |
32 | */
33 |
34 | 'lifetime' => env('SESSION_LIFETIME', 120),
35 |
36 | 'expire_on_close' => false,
37 |
38 | /*
39 | |--------------------------------------------------------------------------
40 | | Session Encryption
41 | |--------------------------------------------------------------------------
42 | |
43 | | This option allows you to easily specify that all of your session data
44 | | should be encrypted before it is stored. All encryption will be run
45 | | automatically by Laravel and you can use the Session like normal.
46 | |
47 | */
48 |
49 | 'encrypt' => false,
50 |
51 | /*
52 | |--------------------------------------------------------------------------
53 | | Session File Location
54 | |--------------------------------------------------------------------------
55 | |
56 | | When using the native session driver, we need a location where session
57 | | files may be stored. A default has been set for you but a different
58 | | location may be specified. This is only needed for file sessions.
59 | |
60 | */
61 |
62 | 'files' => storage_path('framework/sessions'),
63 |
64 | /*
65 | |--------------------------------------------------------------------------
66 | | Session Database Connection
67 | |--------------------------------------------------------------------------
68 | |
69 | | When using the "database" or "redis" session drivers, you may specify a
70 | | connection that should be used to manage these sessions. This should
71 | | correspond to a connection in your database configuration options.
72 | |
73 | */
74 |
75 | 'connection' => env('SESSION_CONNECTION'),
76 |
77 | /*
78 | |--------------------------------------------------------------------------
79 | | Session Database Table
80 | |--------------------------------------------------------------------------
81 | |
82 | | When using the "database" session driver, you may specify the table we
83 | | should use to manage the sessions. Of course, a sensible default is
84 | | provided for you; however, you are free to change this as needed.
85 | |
86 | */
87 |
88 | 'table' => 'sessions',
89 |
90 | /*
91 | |--------------------------------------------------------------------------
92 | | Session Cache Store
93 | |--------------------------------------------------------------------------
94 | |
95 | | While using one of the framework's cache driven session backends you may
96 | | list a cache store that should be used for these sessions. This value
97 | | must match with one of the application's configured cache "stores".
98 | |
99 | | Affects: "apc", "dynamodb", "memcached", "redis"
100 | |
101 | */
102 |
103 | 'store' => env('SESSION_STORE'),
104 |
105 | /*
106 | |--------------------------------------------------------------------------
107 | | Session Sweeping Lottery
108 | |--------------------------------------------------------------------------
109 | |
110 | | Some session drivers must manually sweep their storage location to get
111 | | rid of old sessions from storage. Here are the chances that it will
112 | | happen on a given request. By default, the odds are 2 out of 100.
113 | |
114 | */
115 |
116 | 'lottery' => [2, 100],
117 |
118 | /*
119 | |--------------------------------------------------------------------------
120 | | Session Cookie Name
121 | |--------------------------------------------------------------------------
122 | |
123 | | Here you may change the name of the cookie used to identify a session
124 | | instance by ID. The name specified here will get used every time a
125 | | new session cookie is created by the framework for every driver.
126 | |
127 | */
128 |
129 | 'cookie' => env(
130 | 'SESSION_COOKIE',
131 | Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
132 | ),
133 |
134 | /*
135 | |--------------------------------------------------------------------------
136 | | Session Cookie Path
137 | |--------------------------------------------------------------------------
138 | |
139 | | The session cookie path determines the path for which the cookie will
140 | | be regarded as available. Typically, this will be the root path of
141 | | your application but you are free to change this when necessary.
142 | |
143 | */
144 |
145 | 'path' => '/',
146 |
147 | /*
148 | |--------------------------------------------------------------------------
149 | | Session Cookie Domain
150 | |--------------------------------------------------------------------------
151 | |
152 | | Here you may change the domain of the cookie used to identify a session
153 | | in your application. This will determine which domains the cookie is
154 | | available to in your application. A sensible default has been set.
155 | |
156 | */
157 |
158 | 'domain' => env('SESSION_DOMAIN'),
159 |
160 | /*
161 | |--------------------------------------------------------------------------
162 | | HTTPS Only Cookies
163 | |--------------------------------------------------------------------------
164 | |
165 | | By setting this option to true, session cookies will only be sent back
166 | | to the server if the browser has a HTTPS connection. This will keep
167 | | the cookie from being sent to you when it can't be done securely.
168 | |
169 | */
170 |
171 | 'secure' => env('SESSION_SECURE_COOKIE'),
172 |
173 | /*
174 | |--------------------------------------------------------------------------
175 | | HTTP Access Only
176 | |--------------------------------------------------------------------------
177 | |
178 | | Setting this value to true will prevent JavaScript from accessing the
179 | | value of the cookie and the cookie will only be accessible through
180 | | the HTTP protocol. You are free to modify this option if needed.
181 | |
182 | */
183 |
184 | 'http_only' => true,
185 |
186 | /*
187 | |--------------------------------------------------------------------------
188 | | Same-Site Cookies
189 | |--------------------------------------------------------------------------
190 | |
191 | | This option determines how your cookies behave when cross-site requests
192 | | take place, and can be used to mitigate CSRF attacks. By default, we
193 | | will set this value to "lax" since this is a secure default value.
194 | |
195 | | Supported: "lax", "strict", "none", null
196 | |
197 | */
198 |
199 | 'same_site' => 'lax',
200 |
201 | /*
202 | |--------------------------------------------------------------------------
203 | | Partitioned Cookies
204 | |--------------------------------------------------------------------------
205 | |
206 | | Setting this value to true will tie the cookie to the top-level site for
207 | | a cross-site context. Partitioned cookies are accepted by the browser
208 | | when flagged "secure" and the Same-Site attribute is set to "none".
209 | |
210 | */
211 |
212 | 'partitioned' => false,
213 |
214 | ];
215 |
--------------------------------------------------------------------------------
/config/view.php:
--------------------------------------------------------------------------------
1 | [
17 | resource_path('views'),
18 | ],
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Compiled View Path
23 | |--------------------------------------------------------------------------
24 | |
25 | | This option determines where all the compiled Blade templates will be
26 | | stored for your application. Typically, this is within the storage
27 | | directory. However, as usual, you are free to change this value.
28 | |
29 | */
30 |
31 | 'compiled' => env(
32 | 'VIEW_COMPILED_PATH',
33 | realpath(storage_path('framework/views'))
34 | ),
35 |
36 | ];
37 |
--------------------------------------------------------------------------------
/database/.gitignore:
--------------------------------------------------------------------------------
1 | *.sqlite*
2 |
--------------------------------------------------------------------------------
/database/factories/UserFactory.php:
--------------------------------------------------------------------------------
1 |
11 | */
12 | class UserFactory extends Factory
13 | {
14 | /**
15 | * The current password being used by the factory.
16 | */
17 | protected static ?string $password;
18 |
19 | /**
20 | * Define the model's default state.
21 | *
22 | * @return array
23 | */
24 | public function definition(): array
25 | {
26 | return [
27 | 'name' => fake()->name(),
28 | 'email' => fake()->unique()->safeEmail(),
29 | 'email_verified_at' => now(),
30 | 'password' => static::$password ??= Hash::make('password'),
31 | 'remember_token' => Str::random(10),
32 | ];
33 | }
34 |
35 | /**
36 | * Indicate that the model's email address should be unverified.
37 | */
38 | public function unverified(): static
39 | {
40 | return $this->state(fn (array $attributes) => [
41 | 'email_verified_at' => null,
42 | ]);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/database/migrations/2014_10_12_000000_create_users_table.php:
--------------------------------------------------------------------------------
1 | id();
16 | $table->string('name');
17 | $table->string('email')->unique();
18 | $table->timestamp('email_verified_at')->nullable();
19 | $table->string('password');
20 | $table->rememberToken();
21 | $table->timestamps();
22 | });
23 | }
24 |
25 | /**
26 | * Reverse the migrations.
27 | */
28 | public function down(): void
29 | {
30 | Schema::dropIfExists('users');
31 | }
32 | };
33 |
--------------------------------------------------------------------------------
/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php:
--------------------------------------------------------------------------------
1 | string('email')->primary();
16 | $table->string('token');
17 | $table->timestamp('created_at')->nullable();
18 | });
19 | }
20 |
21 | /**
22 | * Reverse the migrations.
23 | */
24 | public function down(): void
25 | {
26 | Schema::dropIfExists('password_reset_tokens');
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/database/migrations/2019_08_19_000000_create_failed_jobs_table.php:
--------------------------------------------------------------------------------
1 | id();
16 | $table->string('uuid')->unique();
17 | $table->text('connection');
18 | $table->text('queue');
19 | $table->longText('payload');
20 | $table->longText('exception');
21 | $table->timestamp('failed_at')->useCurrent();
22 | });
23 | }
24 |
25 | /**
26 | * Reverse the migrations.
27 | */
28 | public function down(): void
29 | {
30 | Schema::dropIfExists('failed_jobs');
31 | }
32 | };
33 |
--------------------------------------------------------------------------------
/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php:
--------------------------------------------------------------------------------
1 | id();
16 | $table->morphs('tokenable');
17 | $table->string('name');
18 | $table->string('token', 64)->unique();
19 | $table->text('abilities')->nullable();
20 | $table->timestamp('last_used_at')->nullable();
21 | $table->timestamp('expires_at')->nullable();
22 | $table->timestamps();
23 | });
24 | }
25 |
26 | /**
27 | * Reverse the migrations.
28 | */
29 | public function down(): void
30 | {
31 | Schema::dropIfExists('personal_access_tokens');
32 | }
33 | };
34 |
--------------------------------------------------------------------------------
/database/migrations/2024_02_03_194652_create_owners_table.php:
--------------------------------------------------------------------------------
1 | id();
12 | $table->string('name')->unique();
13 | $table->timestamps();
14 | });
15 | }
16 |
17 | public function down(): void
18 | {
19 | Schema::dropIfExists('owners');
20 | }
21 | };
22 |
--------------------------------------------------------------------------------
/database/migrations/2024_02_03_195020_create_projects_table.php:
--------------------------------------------------------------------------------
1 | id();
12 | $table->string('name')->unique();
13 | $table->string('provider');
14 | $table->string('api_key')->nullable();
15 | $table->timestamps();
16 | });
17 | }
18 |
19 | public function down(): void
20 | {
21 | Schema::dropIfExists('projects');
22 | }
23 | };
24 |
--------------------------------------------------------------------------------
/database/migrations/2024_02_04_194511_create_servers_table.php:
--------------------------------------------------------------------------------
1 | id();
12 | $table->string('name');
13 | $table->string('address');
14 | $table->string('ipv4');
15 | $table->string('ipv6')->nullable();
16 | $table->string('remark')->nullable();
17 | $table->string('ssh_user')->nullable();
18 | $table->string('ssh_password')->nullable();
19 | $table->unsignedBigInteger('xui_port')->default(2052)->nullable();
20 | $table->string('xui_username')->nullable();
21 | $table->string('xui_password')->nullable();
22 | $table->foreignIdFor(\App\Models\Owner::class)->nullable()->constrained()->nullOnDelete();
23 | $table->foreignIdFor(\App\Models\Project::class)->nullable()->constrained()->nullOnDelete();
24 | $table->string('domain')->nullable();
25 | $table->string('sessionCookie', 1024)->nullable();
26 | $table->json('tags')->nullable();
27 | $table->timestamps();
28 | });
29 | }
30 |
31 | public function down(): void
32 | {
33 | Schema::dropIfExists('servers');
34 | }
35 | };
36 |
--------------------------------------------------------------------------------
/database/migrations/2024_02_05_215029_add_inbound_stat_to_servers.php:
--------------------------------------------------------------------------------
1 | json('inboundStat')->nullable()->after('sessionCookie'); // Adjust the data type if needed
13 | });
14 | }
15 |
16 | public function down()
17 | {
18 | Schema::table('servers', function (Blueprint $table) {
19 | $table->dropColumn('inboundStat');
20 | });
21 | }
22 | };
--------------------------------------------------------------------------------
/database/migrations/2024_03_04_231834_create_usage_table.php:
--------------------------------------------------------------------------------
1 | id();
17 | $table->foreignIdFor(\App\Models\Server::class,'server_id')->constrained();
18 | $table->integer('inbound_id');
19 | $table->integer('client_id')->nullable();
20 | $table->double('up');
21 | $table->double('down');
22 | $table->double('upIncrease');
23 | $table->double('downIncrease');
24 | $table->timestamps();
25 | });
26 | }
27 |
28 | /**
29 | * Reverse the migrations.
30 | */
31 | public function down(): void
32 | {
33 | Schema::dropIfExists('usages');
34 | }
35 | };
36 |
--------------------------------------------------------------------------------
/database/migrations/2024_03_29_181839_add_status_to_servers_table.php:
--------------------------------------------------------------------------------
1 | enum('status',array_keys(\App\Models\Server::stats()))->default('DRAFT')->nullable();
12 | });
13 | }
14 |
15 | };
16 |
--------------------------------------------------------------------------------
/database/migrations/2024_09_18_194426_create_jobs_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
16 | $table->string('queue')->index();
17 | $table->longText('payload');
18 | $table->unsignedTinyInteger('attempts');
19 | $table->unsignedInteger('reserved_at')->nullable();
20 | $table->unsignedInteger('available_at');
21 | $table->unsignedInteger('created_at');
22 | });
23 | }
24 |
25 | /**
26 | * Reverse the migrations.
27 | */
28 | public function down(): void
29 | {
30 | Schema::dropIfExists('jobs');
31 | }
32 | };
33 |
--------------------------------------------------------------------------------
/database/seeders/DatabaseSeeder.php:
--------------------------------------------------------------------------------
1 | create();
16 |
17 | // \App\Models\User::factory()->create([
18 | // 'name' => 'Test User',
19 | // 'email' => 'test@example.com',
20 | // ]);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "type": "module",
4 | "scripts": {
5 | "dev": "vite",
6 | "build": "vite build"
7 | },
8 | "devDependencies": {
9 | "axios": "^1.6.4",
10 | "laravel-vite-plugin": "^1.0.0",
11 | "vite": "^5.0.0"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 | tests/Unit
10 |
11 |
12 | tests/Feature
13 |
14 |
15 |
16 |
17 | app
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/public/.htaccess:
--------------------------------------------------------------------------------
1 |
2 |
3 | Options -MultiViews -Indexes
4 |
5 |
6 | RewriteEngine On
7 |
8 | # Handle Authorization Header
9 | RewriteCond %{HTTP:Authorization} .
10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
11 |
12 | # Redirect Trailing Slashes If Not A Folder...
13 | RewriteCond %{REQUEST_FILENAME} !-d
14 | RewriteCond %{REQUEST_URI} (.+)/$
15 | RewriteRule ^ %1 [L,R=301]
16 |
17 | # Send Requests To Front Controller...
18 | RewriteCond %{REQUEST_FILENAME} !-d
19 | RewriteCond %{REQUEST_FILENAME} !-f
20 | RewriteRule ^ index.php [L]
21 |
22 |
--------------------------------------------------------------------------------
/public/css/filament/support/support.css:
--------------------------------------------------------------------------------
1 | .fi-pagination-items,.fi-pagination-overview,.fi-pagination-records-per-page-select:not(.fi-compact){display:none}@supports (container-type:inline-size){.fi-pagination{container-type:inline-size}@container (min-width: 28rem){.fi-pagination-records-per-page-select.fi-compact{display:none}.fi-pagination-records-per-page-select:not(.fi-compact){display:inline}}@container (min-width: 56rem){.fi-pagination:not(.fi-simple)>.fi-pagination-previous-btn{display:none}.fi-pagination-overview{display:inline}.fi-pagination:not(.fi-simple)>.fi-pagination-next-btn{display:none}.fi-pagination-items{display:flex}}}@supports not (container-type:inline-size){@media (min-width:640px){.fi-pagination-records-per-page-select.fi-compact{display:none}.fi-pagination-records-per-page-select:not(.fi-compact){display:inline}}@media (min-width:768px){.fi-pagination:not(.fi-simple)>.fi-pagination-previous-btn{display:none}.fi-pagination-overview{display:inline}.fi-pagination:not(.fi-simple)>.fi-pagination-next-btn{display:none}.fi-pagination-items{display:flex}}}.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{background-color:#333;border-radius:4px;color:#fff;font-size:14px;line-height:1.4;outline:0;position:relative;transition-property:transform,visibility,opacity;white-space:normal}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{border-top-color:initial;border-width:8px 8px 0;bottom:-7px;left:0;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:initial;border-width:0 8px 8px;left:0;top:-7px;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-left-color:initial;border-width:8px 0 8px 8px;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{border-right-color:initial;border-width:8px 8px 8px 0;left:-7px;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{color:#333;height:16px;width:16px}.tippy-arrow:before{border-color:transparent;border-style:solid;content:"";position:absolute}.tippy-content{padding:5px 9px;position:relative;z-index:1}.tippy-box[data-theme~=light]{background-color:#fff;box-shadow:0 0 20px 4px #9aa1b126,0 4px 80px -8px #24282f40,0 4px 4px -2px #5b5e6926;color:#26323d}.tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff}.tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff}.tippy-box[data-theme~=light]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light]>.tippy-svg-arrow{fill:#fff}.fi-sortable-ghost{opacity:.3}
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XRaySup/XrayServerManagement/df25235f4234b243962ca24e26595b6c114911f8/public/favicon.ico
--------------------------------------------------------------------------------
/public/index.php:
--------------------------------------------------------------------------------
1 | make(Kernel::class);
50 |
51 | $response = $kernel->handle(
52 | $request = Request::capture()
53 | )->send();
54 |
55 | $kernel->terminate($request, $response);
56 |
--------------------------------------------------------------------------------
/public/js/filament/filament/app.js:
--------------------------------------------------------------------------------
1 | (()=>{var Z=Object.create,L=Object.defineProperty,ee=Object.getPrototypeOf,te=Object.prototype.hasOwnProperty,re=Object.getOwnPropertyNames,ne=Object.getOwnPropertyDescriptor,ae=o=>L(o,"__esModule",{value:!0}),ie=(o,n)=>()=>(n||(n={exports:{}},o(n.exports,n)),n.exports),se=(o,n,p)=>{if(n&&typeof n=="object"||typeof n=="function")for(let d of re(n))!te.call(o,d)&&d!=="default"&&L(o,d,{get:()=>n[d],enumerable:!(p=ne(n,d))||p.enumerable});return o},oe=o=>se(ae(L(o!=null?Z(ee(o)):{},"default",o&&o.__esModule&&"default"in o?{get:()=>o.default,enumerable:!0}:{value:o,enumerable:!0})),o),fe=ie((o,n)=>{(function(p,d,P){if(!p)return;for(var h={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},y={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},g={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},q={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},S,w=1;w<20;++w)h[111+w]="f"+w;for(w=0;w<=9;++w)h[w+96]=w.toString();function O(e,t,a){if(e.addEventListener){e.addEventListener(t,a,!1);return}e.attachEvent("on"+t,a)}function T(e){if(e.type=="keypress"){var t=String.fromCharCode(e.which);return e.shiftKey||(t=t.toLowerCase()),t}return h[e.which]?h[e.which]:y[e.which]?y[e.which]:String.fromCharCode(e.which).toLowerCase()}function $(e,t){return e.sort().join(",")===t.sort().join(",")}function B(e){var t=[];return e.shiftKey&&t.push("shift"),e.altKey&&t.push("alt"),e.ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),t}function V(e){if(e.preventDefault){e.preventDefault();return}e.returnValue=!1}function H(e){if(e.stopPropagation){e.stopPropagation();return}e.cancelBubble=!0}function C(e){return e=="shift"||e=="ctrl"||e=="alt"||e=="meta"}function J(){if(!S){S={};for(var e in h)e>95&&e<112||h.hasOwnProperty(e)&&(S[h[e]]=e)}return S}function U(e,t,a){return a||(a=J()[e]?"keydown":"keypress"),a=="keypress"&&t.length&&(a="keydown"),a}function X(e){return e==="+"?["+"]:(e=e.replace(/\+{2}/g,"+plus"),e.split("+"))}function I(e,t){var a,c,b,M=[];for(a=X(e),b=0;b1){z(r,m,s,l);return}f=I(r,l),t._callbacks[f.key]=t._callbacks[f.key]||[],j(f.key,f.modifiers,{type:f.action},i,r,u),t._callbacks[f.key][i?"unshift":"push"]({callback:s,modifiers:f.modifiers,action:f.action,seq:i,level:u,combo:r})}t._bindMultiple=function(r,s,l){for(var i=0;i-1||D(t,a.target))return!1;if("composedPath"in e&&typeof e.composedPath=="function"){var c=e.composedPath()[0];c!==e.target&&(t=c)}return t.tagName=="INPUT"||t.tagName=="SELECT"||t.tagName=="TEXTAREA"||t.isContentEditable},v.prototype.handleKey=function(){var e=this;return e._handleKey.apply(e,arguments)},v.addKeycodes=function(e){for(var t in e)e.hasOwnProperty(t)&&(h[t]=e[t]);S=null},v.init=function(){var e=v(d);for(var t in e)t.charAt(0)!=="_"&&(v[t]=function(a){return function(){return e[a].apply(e,arguments)}}(t))},v.init(),p.Mousetrap=v,typeof n<"u"&&n.exports&&(n.exports=v),typeof define=="function"&&define.amd&&define(function(){return v})})(typeof window<"u"?window:null,typeof window<"u"?document:null)}),R=oe(fe());(function(o){if(o){var n={},p=o.prototype.stopCallback;o.prototype.stopCallback=function(d,P,h,y){var g=this;return g.paused?!0:n[h]||n[y]?!1:p.call(g,d,P,h)},o.prototype.bindGlobal=function(d,P,h){var y=this;if(y.bind(d,P,h),d instanceof Array){for(var g=0;g{o.directive("mousetrap",(n,{modifiers:p,expression:d},{evaluate:P})=>{let h=()=>d?P(d):n.click();p=p.map(y=>y.replace("-","+")),p.includes("global")&&(p=p.filter(y=>y!=="global"),R.default.bindGlobal(p,y=>{y.preventDefault(),h()})),R.default.bind(p,y=>{y.preventDefault(),h()})})},F=le;document.addEventListener("alpine:init",()=>{window.Alpine.plugin(F),window.Alpine.store("sidebar",{isOpen:window.Alpine.$persist(!0).as("isOpen"),collapsedGroups:window.Alpine.$persist(null).as("collapsedGroups"),groupIsCollapsed:function(n){return this.collapsedGroups.includes(n)},collapseGroup:function(n){this.collapsedGroups.includes(n)||(this.collapsedGroups=this.collapsedGroups.concat(n))},toggleCollapsedGroup:function(n){this.collapsedGroups=this.collapsedGroups.includes(n)?this.collapsedGroups.filter(p=>p!==n):this.collapsedGroups.concat(n)},close:function(){this.isOpen=!1},open:function(){this.isOpen=!0}});let o=localStorage.getItem("theme")??"system";window.Alpine.store("theme",o==="dark"||o==="system"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),window.addEventListener("theme-changed",n=>{let p=n.detail;localStorage.setItem("theme",p),p==="system"&&(p=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),window.Alpine.store("theme",p)}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",n=>{localStorage.getItem("theme")==="system"&&window.Alpine.store("theme",n.matches?"dark":"light")}),window.Alpine.effect(()=>{window.Alpine.store("theme")==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")})});})();
2 |
--------------------------------------------------------------------------------
/public/js/filament/forms/components/key-value.js:
--------------------------------------------------------------------------------
1 | function r({state:i}){return{state:i,rows:[],shouldUpdateRows:!0,init:function(){this.updateRows(),this.rows.length<=0?this.rows.push({key:"",value:""}):this.updateState(),this.$watch("state",(t,e)=>{let s=o=>o===null?0:Array.isArray(o)?o.length:typeof o!="object"?0:Object.keys(o).length;s(t)===0&&s(e)===0||this.updateRows()})},addRow:function(){this.rows.push({key:"",value:""}),this.updateState()},deleteRow:function(t){this.rows.splice(t,1),this.rows.length<=0&&this.addRow(),this.updateState()},reorderRows:function(t){let e=Alpine.raw(this.rows),s=e.splice(t.oldIndex,1)[0];e.splice(t.newIndex,0,s),this.rows=e,this.updateState()},updateRows:function(){if(!this.shouldUpdateRows){this.shouldUpdateRows=!0;return}let t=[];for(let[e,s]of Object.entries(this.state??{}))t.push({key:e,value:s});this.rows=t},updateState:function(){let t={};this.rows.forEach(e=>{e.key===""||e.key===null||(t[e.key]=e.value)}),this.shouldUpdateRows=!1,this.state=t}}}export{r as default};
2 |
--------------------------------------------------------------------------------
/public/js/filament/forms/components/tags-input.js:
--------------------------------------------------------------------------------
1 | function i({state:a,splitKeys:n}){return{newTag:"",state:a,createTag:function(){if(this.newTag=this.newTag.trim(),this.newTag!==""){if(this.state.includes(this.newTag)){this.newTag="";return}this.state.push(this.newTag),this.newTag=""}},deleteTag:function(t){this.state=this.state.filter(e=>e!==t)},reorderTags:function(t){let e=this.state.splice(t.oldIndex,1)[0];this.state.splice(t.newIndex,0,e),this.state=[...this.state]},input:{["x-on:blur"]:"createTag()",["x-model"]:"newTag",["x-on:keydown"](t){["Enter",...n].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.createTag())},["x-on:paste"](){this.$nextTick(()=>{if(n.length===0){this.createTag();return}let t=n.map(e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")).join("|");this.newTag.split(new RegExp(t,"g")).forEach(e=>{this.newTag=e,this.createTag()})})}}}}export{i as default};
2 |
--------------------------------------------------------------------------------
/public/js/filament/forms/components/textarea.js:
--------------------------------------------------------------------------------
1 | function t({initialHeight:e}){return{init:function(){this.render()},render:function(){this.$el.scrollHeight>0&&(this.$el.style.height=e+"rem",this.$el.style.height=this.$el.scrollHeight+"px")}}}export{t as default};
2 |
--------------------------------------------------------------------------------
/public/js/filament/notifications/notifications.js:
--------------------------------------------------------------------------------
1 | (()=>{var O=Object.create;var $=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var Y=Object.getOwnPropertyNames;var H=Object.getPrototypeOf,W=Object.prototype.hasOwnProperty;var d=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports);var j=(i,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Y(t))!W.call(i,n)&&n!==e&&$(i,n,{get:()=>t[n],enumerable:!(s=V(t,n))||s.enumerable});return i};var J=(i,t,e)=>(e=i!=null?O(H(i)):{},j(t||!i||!i.__esModule?$(e,"default",{value:i,enumerable:!0}):e,i));var S=d((ut,_)=>{var v,g=typeof global<"u"&&(global.crypto||global.msCrypto);g&&g.getRandomValues&&(y=new Uint8Array(16),v=function(){return g.getRandomValues(y),y});var y;v||(T=new Array(16),v=function(){for(var i=0,t;i<16;i++)i&3||(t=Math.random()*4294967296),T[i]=t>>>((i&3)<<3)&255;return T});var T;_.exports=v});var C=d((ct,U)=>{var P=[];for(f=0;f<256;++f)P[f]=(f+256).toString(16).substr(1);var f;function K(i,t){var e=t||0,s=P;return s[i[e++]]+s[i[e++]]+s[i[e++]]+s[i[e++]]+"-"+s[i[e++]]+s[i[e++]]+"-"+s[i[e++]]+s[i[e++]]+"-"+s[i[e++]]+s[i[e++]]+"-"+s[i[e++]]+s[i[e++]]+s[i[e++]]+s[i[e++]]+s[i[e++]]+s[i[e++]]}U.exports=K});var R=d((lt,F)=>{var Q=S(),X=C(),a=Q(),Z=[a[0]|1,a[1],a[2],a[3],a[4],a[5]],b=(a[6]<<8|a[7])&16383,D=0,A=0;function tt(i,t,e){var s=t&&e||0,n=t||[];i=i||{};var r=i.clockseq!==void 0?i.clockseq:b,o=i.msecs!==void 0?i.msecs:new Date().getTime(),h=i.nsecs!==void 0?i.nsecs:A+1,l=o-D+(h-A)/1e4;if(l<0&&i.clockseq===void 0&&(r=r+1&16383),(l<0||o>D)&&i.nsecs===void 0&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");D=o,A=h,b=r,o+=122192928e5;var c=((o&268435455)*1e4+h)%4294967296;n[s++]=c>>>24&255,n[s++]=c>>>16&255,n[s++]=c>>>8&255,n[s++]=c&255;var u=o/4294967296*1e4&268435455;n[s++]=u>>>8&255,n[s++]=u&255,n[s++]=u>>>24&15|16,n[s++]=u>>>16&255,n[s++]=r>>>8|128,n[s++]=r&255;for(var N=i.node||Z,m=0;m<6;++m)n[s+m]=N[m];return t||X(n)}F.exports=tt});var I=d((dt,G)=>{var it=S(),et=C();function st(i,t,e){var s=t&&e||0;typeof i=="string"&&(t=i=="binary"?new Array(16):null,i=null),i=i||{};var n=i.random||(i.rng||it)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t)for(var r=0;r<16;++r)t[s+r]=n[r];return t||et(n)}G.exports=st});var B=d((ft,z)=>{var nt=R(),M=I(),E=M;E.v1=nt;E.v4=M;z.exports=E});function k(i,t=()=>{}){let e=!1;return function(){e?t.apply(this,arguments):(e=!0,i.apply(this,arguments))}}var q=i=>{i.data("notificationComponent",({notification:t})=>({isShown:!1,computedStyle:null,transitionDuration:null,transitionEasing:null,init:function(){this.computedStyle=window.getComputedStyle(this.$el),this.transitionDuration=parseFloat(this.computedStyle.transitionDuration)*1e3,this.transitionEasing=this.computedStyle.transitionTimingFunction,this.configureTransitions(),this.configureAnimations(),t.duration&&t.duration!=="persistent"&&setTimeout(()=>this.close(),t.duration),this.isShown=!0},configureTransitions:function(){let e=this.computedStyle.display,s=()=>{i.mutateDom(()=>{this.$el.style.setProperty("display",e),this.$el.style.setProperty("visibility","visible")}),this.$el._x_isShown=!0},n=()=>{i.mutateDom(()=>{this.$el._x_isShown?this.$el.style.setProperty("visibility","hidden"):this.$el.style.setProperty("display","none")})},r=k(o=>o?s():n(),o=>{this.$el._x_toggleAndCascadeWithTransitions(this.$el,o,s,n)});i.effect(()=>r(this.isShown))},configureAnimations:function(){let e;Livewire.hook("commit",({component:s,commit:n,succeed:r,fail:o,respond:h})=>{if(!s.snapshot.data.isFilamentNotificationsComponent)return;let l=()=>this.$el.getBoundingClientRect().top,c=l();h(()=>{e=()=>{this.isShown&&this.$el.animate([{transform:`translateY(${c-l()}px)`},{transform:"translateY(0px)"}],{duration:this.transitionDuration,easing:this.transitionEasing})},this.$el.getAnimations().forEach(u=>u.finish())}),r(({snapshot:u,effect:N})=>{e()})})},close:function(){this.isShown=!1,setTimeout(()=>window.dispatchEvent(new CustomEvent("notificationClosed",{detail:{id:t.id}})),this.transitionDuration)},markAsRead:function(){window.dispatchEvent(new CustomEvent("markedNotificationAsRead",{detail:{id:t.id}}))},markAsUnread:function(){window.dispatchEvent(new CustomEvent("markedNotificationAsUnread",{detail:{id:t.id}}))}}))};var L=J(B(),1),p=class{constructor(){return this.id((0,L.v4)()),this}id(t){return this.id=t,this}title(t){return this.title=t,this}body(t){return this.body=t,this}actions(t){return this.actions=t,this}status(t){return this.status=t,this}color(t){return this.color=t,this}icon(t){return this.icon=t,this}iconColor(t){return this.iconColor=t,this}duration(t){return this.duration=t,this}seconds(t){return this.duration(t*1e3),this}persistent(){return this.duration("persistent"),this}danger(){return this.status("danger"),this}info(){return this.status("info"),this}success(){return this.status("success"),this}warning(){return this.status("warning"),this}view(t){return this.view=t,this}viewData(t){return this.viewData=t,this}send(){return window.dispatchEvent(new CustomEvent("notificationSent",{detail:{notification:this}})),this}},w=class{constructor(t){return this.name(t),this}name(t){return this.name=t,this}color(t){return this.color=t,this}dispatch(t,e){return this.event(t),this.eventData(e),this}dispatchSelf(t,e){return this.dispatch(t,e),this.dispatchDirection="self",this}dispatchTo(t,e,s){return this.dispatch(e,s),this.dispatchDirection="to",this.dispatchToComponent=t,this}emit(t,e){return this.dispatch(t,e),this}emitSelf(t,e){return this.dispatchSelf(t,e),this}emitTo(t,e,s){return this.dispatchTo(t,e,s),this}dispatchDirection(t){return this.dispatchDirection=t,this}dispatchToComponent(t){return this.dispatchToComponent=t,this}event(t){return this.event=t,this}eventData(t){return this.eventData=t,this}extraAttributes(t){return this.extraAttributes=t,this}icon(t){return this.icon=t,this}iconPosition(t){return this.iconPosition=t,this}outlined(t=!0){return this.isOutlined=t,this}disabled(t=!0){return this.isDisabled=t,this}label(t){return this.label=t,this}close(t=!0){return this.shouldClose=t,this}openUrlInNewTab(t=!0){return this.shouldOpenUrlInNewTab=t,this}size(t){return this.size=t,this}url(t){return this.url=t,this}view(t){return this.view=t,this}button(){return this.view("filament-notifications::actions.button-action"),this}grouped(){return this.view("filament-notifications::actions.grouped-action"),this}link(){return this.view("filament-notifications::actions.link-action"),this}},x=class{constructor(t){return this.actions(t),this}actions(t){return this.actions=t.map(e=>e.grouped()),this}color(t){return this.color=t,this}icon(t){return this.icon=t,this}iconPosition(t){return this.iconPosition=t,this}label(t){return this.label=t,this}tooltip(t){return this.tooltip=t,this}};window.FilamentNotificationAction=w;window.FilamentNotificationActionGroup=x;window.FilamentNotification=p;document.addEventListener("alpine:init",()=>{window.Alpine.plugin(q)});})();
2 |
--------------------------------------------------------------------------------
/public/js/filament/support/async-alpine.js:
--------------------------------------------------------------------------------
1 | (()=>{(()=>{var d=Object.defineProperty,m=t=>d(t,"__esModule",{value:!0}),f=(t,e)=>{m(t);for(var i in e)d(t,i,{get:e[i],enumerable:!0})},o={};f(o,{eager:()=>g,event:()=>w,idle:()=>y,media:()=>b,visible:()=>E});var c=()=>!0,g=c,v=({component:t,argument:e})=>new Promise(i=>{if(e)window.addEventListener(e,()=>i(),{once:!0});else{let n=a=>{a.detail.id===t.id&&(window.removeEventListener("async-alpine:load",n),i())};window.addEventListener("async-alpine:load",n)}}),w=v,x=()=>new Promise(t=>{"requestIdleCallback"in window?window.requestIdleCallback(t):setTimeout(t,200)}),y=x,A=({argument:t})=>new Promise(e=>{if(!t)return console.log("Async Alpine: media strategy requires a media query. Treating as 'eager'"),e();let i=window.matchMedia(`(${t})`);i.matches?e():i.addEventListener("change",e,{once:!0})}),b=A,$=({component:t,argument:e})=>new Promise(i=>{let n=e||"0px 0px 0px 0px",a=new IntersectionObserver(r=>{r[0].isIntersecting&&(a.disconnect(),i())},{rootMargin:n});a.observe(t.el)}),E=$;function P(t){let e=q(t),i=u(e);return i.type==="method"?{type:"expression",operator:"&&",parameters:[i]}:i}function q(t){let e=/\s*([()])\s*|\s*(\|\||&&|\|)\s*|\s*((?:[^()&|]+\([^()]+\))|[^()&|]+)\s*/g,i=[],n;for(;(n=e.exec(t))!==null;){let[,a,r,s]=n;if(a!==void 0)i.push({type:"parenthesis",value:a});else if(r!==void 0)i.push({type:"operator",value:r==="|"?"&&":r});else{let p={type:"method",method:s.trim()};s.includes("(")&&(p.method=s.substring(0,s.indexOf("(")).trim(),p.argument=s.substring(s.indexOf("(")+1,s.indexOf(")"))),s.method==="immediate"&&(s.method="eager"),i.push(p)}}return i}function u(t){let e=h(t);for(;t.length>0&&(t[0].value==="&&"||t[0].value==="|"||t[0].value==="||");){let i=t.shift().value,n=h(t);e.type==="expression"&&e.operator===i?e.parameters.push(n):e={type:"expression",operator:i,parameters:[e,n]}}return e}function h(t){if(t[0].value==="("){t.shift();let e=u(t);return t[0].value===")"&&t.shift(),e}else return t.shift()}var _="__internal_",l={Alpine:null,_options:{prefix:"ax-",alpinePrefix:"x-",root:"load",inline:"load-src",defaultStrategy:"eager"},_alias:!1,_data:{},_realIndex:0,get _index(){return this._realIndex++},init(t,e={}){return this.Alpine=t,this._options={...this._options,...e},this},start(){return this._processInline(),this._setupComponents(),this._mutations(),this},data(t,e=!1){return this._data[t]={loaded:!1,download:e},this},url(t,e){!t||!e||(this._data[t]||this.data(t),this._data[t].download=()=>import(this._parseUrl(e)))},alias(t){this._alias=t},_processInline(){let t=document.querySelectorAll(`[${this._options.prefix}${this._options.inline}]`);for(let e of t)this._inlineElement(e)},_inlineElement(t){let e=t.getAttribute(`${this._options.alpinePrefix}data`),i=t.getAttribute(`${this._options.prefix}${this._options.inline}`);if(!e||!i)return;let n=this._parseName(e);this.url(n,i)},_setupComponents(){let t=document.querySelectorAll(`[${this._options.prefix}${this._options.root}]`);for(let e of t)this._setupComponent(e)},_setupComponent(t){let e=t.getAttribute(`${this._options.alpinePrefix}data`);t.setAttribute(`${this._options.alpinePrefix}ignore`,"");let i=this._parseName(e),n=t.getAttribute(`${this._options.prefix}${this._options.root}`)||this._options.defaultStrategy;this._componentStrategy({name:i,strategy:n,el:t,id:t.id||this._index})},async _componentStrategy(t){let e=P(t.strategy);await this._generateRequirements(t,e),await this._download(t.name),this._activate(t)},_generateRequirements(t,e){if(e.type==="expression"){if(e.operator==="&&")return Promise.all(e.parameters.map(i=>this._generateRequirements(t,i)));if(e.operator==="||")return Promise.any(e.parameters.map(i=>this._generateRequirements(t,i)))}return o[e.method]?o[e.method]({component:t,argument:e.argument}):!1},async _download(t){if(t.startsWith(_)||(this._handleAlias(t),!this._data[t]||this._data[t].loaded))return;let e=await this._getModule(t);this.Alpine.data(t,e),this._data[t].loaded=!0},async _getModule(t){if(!this._data[t])return;let e=await this._data[t].download(t);return typeof e=="function"?e:e[t]||e.default||Object.values(e)[0]||!1},_activate(t){this.Alpine.destroyTree(t.el),t.el.removeAttribute(`${this._options.alpinePrefix}ignore`),t.el._x_ignore=!1,this.Alpine.initTree(t.el)},_mutations(){new MutationObserver(t=>{for(let e of t)if(e.addedNodes)for(let i of e.addedNodes)i.nodeType===1&&(i.hasAttribute(`${this._options.prefix}${this._options.root}`)&&this._mutationEl(i),i.querySelectorAll(`[${this._options.prefix}${this._options.root}]`).forEach(n=>this._mutationEl(n)))}).observe(document,{attributes:!0,childList:!0,subtree:!0})},_mutationEl(t){t.hasAttribute(`${this._options.prefix}${this._options.inline}`)&&this._inlineElement(t),this._setupComponent(t)},_handleAlias(t){if(!(!this._alias||this._data[t])){if(typeof this._alias=="function"){this.data(t,this._alias);return}this.url(t,this._alias.replaceAll("[name]",t))}},_parseName(t){return(t||"").split(/[({]/g)[0]||`${_}${this._index}`},_parseUrl(t){return new RegExp("^(?:[a-z+]+:)?//","i").test(t)?t:new URL(t,document.baseURI).href}};document.addEventListener("alpine:init",()=>{window.AsyncAlpine=l,l.init(Alpine,window.AsyncAlpineOptions||{}),document.dispatchEvent(new CustomEvent("async-alpine:init")),l.start()})})();})();
2 |
--------------------------------------------------------------------------------
/public/js/filament/tables/components/table.js:
--------------------------------------------------------------------------------
1 | function c(){return{collapsedGroups:[],isLoading:!1,selectedRecords:[],shouldCheckUniqueSelection:!0,init:function(){this.$wire.$on("deselectAllTableRecords",()=>this.deselectAllRecords()),this.$watch("selectedRecords",()=>{if(!this.shouldCheckUniqueSelection){this.shouldCheckUniqueSelection=!0;return}this.selectedRecords=[...new Set(this.selectedRecords)],this.shouldCheckUniqueSelection=!1})},mountAction:function(e,s=null){this.$wire.set("selectedTableRecords",this.selectedRecords,!1),this.$wire.mountTableAction(e,s)},mountBulkAction:function(e){this.$wire.set("selectedTableRecords",this.selectedRecords,!1),this.$wire.mountTableBulkAction(e)},toggleSelectRecordsOnPage:function(){let e=this.getRecordsOnPage();if(this.areRecordsSelected(e)){this.deselectRecords(e);return}this.selectRecords(e)},toggleSelectRecordsInGroup:async function(e){if(this.isLoading=!0,this.areRecordsSelected(this.getRecordsInGroupOnPage(e))){this.deselectRecords(await this.$wire.getGroupedSelectableTableRecordKeys(e));return}this.selectRecords(await this.$wire.getGroupedSelectableTableRecordKeys(e)),this.isLoading=!1},getRecordsInGroupOnPage:function(e){let s=[];for(let t of this.$root?.getElementsByClassName("fi-ta-record-checkbox")??[])t.dataset.group===e&&s.push(t.value);return s},getRecordsOnPage:function(){let e=[];for(let s of this.$root?.getElementsByClassName("fi-ta-record-checkbox")??[])e.push(s.value);return e},selectRecords:function(e){for(let s of e)this.isRecordSelected(s)||this.selectedRecords.push(s)},deselectRecords:function(e){for(let s of e){let t=this.selectedRecords.indexOf(s);t!==-1&&this.selectedRecords.splice(t,1)}},selectAllRecords:async function(){this.isLoading=!0,this.selectedRecords=await this.$wire.getAllSelectableTableRecordKeys(),this.isLoading=!1},deselectAllRecords:function(){this.selectedRecords=[]},isRecordSelected:function(e){return this.selectedRecords.includes(e)},areRecordsSelected:function(e){return e.every(s=>this.isRecordSelected(s))},toggleCollapseGroup:function(e){if(this.isGroupCollapsed(e)){this.collapsedGroups.splice(this.collapsedGroups.indexOf(e),1);return}this.collapsedGroups.push(e)},isGroupCollapsed:function(e){return this.collapsedGroups.includes(e)},resetCollapsedGroups:function(){this.collapsedGroups=[]}}}export{c as default};
2 |
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow:
3 |
--------------------------------------------------------------------------------
/public/xray.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XRaySup/XrayServerManagement/df25235f4234b243962ca24e26595b6c114911f8/public/xray.jpg
--------------------------------------------------------------------------------
/resources/css/app.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XRaySup/XrayServerManagement/df25235f4234b243962ca24e26595b6c114911f8/resources/css/app.css
--------------------------------------------------------------------------------
/resources/js/app.js:
--------------------------------------------------------------------------------
1 | import './bootstrap';
2 |
--------------------------------------------------------------------------------
/resources/js/bootstrap.js:
--------------------------------------------------------------------------------
1 | /**
2 | * We'll load the axios HTTP library which allows us to easily issue requests
3 | * to our Laravel back-end. This library automatically handles sending the
4 | * CSRF token as a header based on the value of the "XSRF" token cookie.
5 | */
6 |
7 | import axios from 'axios';
8 | window.axios = axios;
9 |
10 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
11 |
12 | /**
13 | * Echo exposes an expressive API for subscribing to channels and listening
14 | * for events that are broadcast by Laravel. Echo and event broadcasting
15 | * allows your team to easily build robust real-time web applications.
16 | */
17 |
18 | // import Echo from 'laravel-echo';
19 |
20 | // import Pusher from 'pusher-js';
21 | // window.Pusher = Pusher;
22 |
23 | // window.Echo = new Echo({
24 | // broadcaster: 'pusher',
25 | // key: import.meta.env.VITE_PUSHER_APP_KEY,
26 | // cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER ?? 'mt1',
27 | // wsHost: import.meta.env.VITE_PUSHER_HOST ? import.meta.env.VITE_PUSHER_HOST : `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`,
28 | // wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80,
29 | // wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443,
30 | // forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https',
31 | // enabledTransports: ['ws', 'wss'],
32 | // });
33 |
--------------------------------------------------------------------------------
/routes/api.php:
--------------------------------------------------------------------------------
1 | get('/user', function (Request $request) {
18 | return $request->user();
19 | });
20 |
--------------------------------------------------------------------------------
/routes/channels.php:
--------------------------------------------------------------------------------
1 | id === (int) $id;
18 | });
19 |
--------------------------------------------------------------------------------
/routes/console.php:
--------------------------------------------------------------------------------
1 | comment(Inspiring::quote());
19 | })->purpose('Display an inspiring quote');
20 |
--------------------------------------------------------------------------------
/routes/web.php:
--------------------------------------------------------------------------------
1 | json(['status' => 'POST request received']);
25 | });
26 |
--------------------------------------------------------------------------------
/storage/app/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !public/
3 | !.gitignore
4 |
--------------------------------------------------------------------------------
/storage/app/public/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/.gitignore:
--------------------------------------------------------------------------------
1 | compiled.php
2 | config.php
3 | down
4 | events.scanned.php
5 | maintenance.php
6 | routes.php
7 | routes.scanned.php
8 | schedule-*
9 | services.json
10 |
--------------------------------------------------------------------------------
/storage/framework/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !data/
3 | !.gitignore
4 |
--------------------------------------------------------------------------------
/storage/framework/cache/data/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/sessions/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/testing/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/views/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/leastSample-IranDir.json:
--------------------------------------------------------------------------------
1 | {
2 | "dns": {
3 | "hosts": {
4 | "geosite:category-ads-all": "127.0.0.1",
5 | "geosite:category-ads-ir": "127.0.0.1",
6 | "domain:googleapis.cn": "googleapis.com"
7 | },
8 | "servers": [
9 | "https://94.140.14.14/dns-query",
10 | {
11 | "address": "1.1.1.1",
12 | "domains": [
13 | "geosite:private",
14 | "geosite:category-ir",
15 | "domain:.ir"
16 | ],
17 | "expectIPs": [
18 | "geoip:cn"
19 | ],
20 | "port": 53
21 | }
22 | ]
23 | },
24 | "fakedns": [
25 | {
26 | "ipPool": "198.18.0.0/15",
27 | "poolSize": 10000
28 | }
29 | ],
30 | "inbounds": [
31 | {
32 | "port": 10808,
33 | "protocol": "socks",
34 | "settings": {
35 | "auth": "noauth",
36 | "udp": true,
37 | "userLevel": 8
38 | },
39 | "sniffing": {
40 | "destOverride": [
41 | "http",
42 | "tls",
43 | "fakedns"
44 | ],
45 | "enabled": true
46 | },
47 | "tag": "socks"
48 | },
49 | {
50 | "port": 10809,
51 | "protocol": "http",
52 | "settings": {
53 | "userLevel": 8
54 | },
55 | "tag": "http"
56 | }
57 | ],
58 | "log": {
59 | "loglevel": "debug"
60 | },
61 | "outbounds": [
62 | {
63 | "protocol": "freedom",
64 | "settings": {
65 | "domainStrategy": "UseIP"
66 | },
67 | "tag": "direct"
68 | },
69 | {
70 | "protocol": "blackhole",
71 | "settings": {
72 | "response": {
73 | "type": "http"
74 | }
75 | },
76 | "tag": "block"
77 | }
78 | ],
79 | "policy": {
80 | "levels": {
81 | "8": {
82 | "connIdle": 300,
83 | "downlinkOnly": 1,
84 | "handshake": 4,
85 | "uplinkOnly": 1
86 | }
87 | },
88 | "system": {
89 | "statsOutboundUplink": true,
90 | "statsOutboundDownlink": true
91 | }
92 | },
93 | "routing": {
94 | "domainStrategy": "IPIfNonMatch",
95 | "rules": [
96 | {
97 | "ip": [
98 | "1.1.1.1"
99 | ],
100 | "outboundTag": "direct",
101 | "port": "53",
102 | "type": "field"
103 | },
104 | {
105 | "domain": [
106 | "geosite:private",
107 | "geosite:category-ir",
108 | "domain:.ir"
109 | ],
110 | "outboundTag": "direct",
111 | "type": "field"
112 | },
113 | {
114 | "ip": [
115 | "geoip:private",
116 | "geoip:ir"
117 | ],
118 | "outboundTag": "direct",
119 | "type": "field"
120 | },
121 | {
122 | "domain": [
123 | "geosite:category-ads-all",
124 | "geosite:category-ads-ir"
125 | ],
126 | "outboundTag": "block",
127 | "type": "field"
128 | },
129 | {
130 | "balancerTag": "all",
131 | "type": "field",
132 | "network": "tcp,udp"
133 | }
134 | ],
135 | "balancers": [
136 | {
137 | "tag": "all",
138 | "selector": [
139 | "pr",
140 | "pf"
141 | ],
142 | "strategy": {
143 | "type": "leastload"
144 | }
145 | }
146 | ]
147 | },
148 | "burstObservatory": {
149 | "subjectSelector": [
150 | "pr",
151 | "pf"
152 | ],
153 | "pingConfig": {
154 | "destination": "http://www.apple.com/library/test/success.html",
155 | "interval": "2m",
156 | "connectivity": "http://connectivitycheck.platform.hicloud.com/generate_204",
157 | "timeout": "4s",
158 | "sampling": 3,
159 | "EnableConcurrency": true
160 | }
161 | },
162 | "observatory": {
163 | "probeInterval": "2m",
164 | "probeURL": "https://api.github.com/_private/browser/stats",
165 | "subjectSelector": [
166 | "pr",
167 | "pf"
168 | ],
169 | "EnableConcurrency": true
170 | },
171 | "remarks": "⭐️least ping⭐️"
172 | }
--------------------------------------------------------------------------------
/storage/logs/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/magic.json:
--------------------------------------------------------------------------------
1 | {
2 | "dns": {
3 | "queryStrategy": "UseIP",
4 | "servers": [
5 | "https://8.8.8.8/dns-query"
6 | ],
7 | "tag": "dns"
8 | },
9 | "inbounds": [
10 | {
11 | "port": 10808,
12 | "protocol": "socks",
13 | "settings": {
14 | "auth": "noauth",
15 | "udp": true,
16 | "userLevel": 8
17 | },
18 | "sniffing": {
19 | "destOverride": [
20 | "http",
21 | "tls",
22 | "fakedns"
23 | ],
24 | "enabled": true
25 | },
26 | "tag": "socks"
27 | },
28 | {
29 | "port": 10809,
30 | "protocol": "http",
31 | "settings": {
32 | "userLevel": 8
33 | },
34 | "tag": "http"
35 | }
36 | ],
37 | "log": {
38 | "loglevel": "warning"
39 | },
40 | "outbounds": [
41 | {
42 | "protocol": "freedom",
43 | "settings": {
44 | "domainStrategy": "UseIP"
45 | },
46 | "tag": "direct"
47 | },
48 | {
49 | "protocol": "blackhole",
50 | "settings": {
51 | "response": {
52 | "type": "http"
53 | }
54 | },
55 | "tag": "block"
56 | }
57 | ],
58 | "policy": {
59 | "levels": {
60 | "8": {
61 | "connIdle": 300,
62 | "downlinkOnly": 1,
63 | "handshake": 4,
64 | "uplinkOnly": 1
65 | }
66 | },
67 | "system": {
68 | "statsOutboundUplink": true,
69 | "statsOutboundDownlink": true
70 | }
71 | },
72 | "remarks": "⭐️Magic 4⭐️",
73 | "routing": {
74 | "domainStrategy": "IPIfNonMatch",
75 | "rules": [
76 | {
77 | "ip": [
78 | "1.1.1.1"
79 | ],
80 | "outboundTag": "direct",
81 | "port": "53",
82 | "type": "field"
83 | },
84 | {
85 | "domain": [
86 | "geosite:private",
87 | "geosite:category-ir",
88 | "domain:.ir"
89 | ],
90 | "outboundTag": "direct",
91 | "type": "field"
92 | },
93 | {
94 | "ip": [
95 | "geoip:private",
96 | "geoip:ir"
97 | ],
98 | "outboundTag": "direct",
99 | "type": "field"
100 | },
101 | {
102 | "domain": [
103 | "geosite:category-ads-all",
104 | "geosite:category-ads-ir"
105 | ],
106 | "outboundTag": "block",
107 | "type": "field"
108 | },
109 | {
110 | "domain": [
111 | "geosite:twitter",
112 | "geosite:facebook",
113 | "geosite:google",
114 | "geosite:telegram",
115 | "domain:speedtest.net"
116 | ],
117 | "outboundTag": "dir-fragment",
118 | "type": "field"
119 | },
120 | {
121 | "balancerTag": "all",
122 | "type": "field",
123 | "network": "tcp,udp"
124 | }
125 | ],
126 | "balancers": [
127 | {
128 | "tag": "all",
129 | "selector": [
130 | "proxy"
131 | ],
132 | "strategy": {
133 | "type": "leastload"
134 | }
135 | }
136 | ]
137 | },
138 | "burstObservatory": {
139 | "subjectSelector": [
140 | "proxy"
141 | ],
142 | "pingConfig": {
143 | "destination": "http://www.apple.com/library/test/success.html",
144 | "interval": "2m",
145 | "connectivity": "http://connectivitycheck.platform.hicloud.com/generate_204",
146 | "timeout": "4s",
147 | "sampling": 3,
148 | "EnableConcurrency": true
149 | }
150 | },
151 | "observatory": {
152 | "probeInterval": "2m",
153 | "probeURL": "https://api.github.com/_private/browser/stats",
154 | "subjectSelector": [
155 | "proxy"
156 | ],
157 | "EnableConcurrency": true
158 | },
159 | "stats": {}
160 | }
--------------------------------------------------------------------------------
/tests/CreatesApplication.php:
--------------------------------------------------------------------------------
1 | make(Kernel::class)->bootstrap();
18 |
19 | return $app;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/tests/Feature/ExampleTest.php:
--------------------------------------------------------------------------------
1 | get('/');
16 |
17 | $response->assertStatus(200);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/tests/TestCase.php:
--------------------------------------------------------------------------------
1 | assertTrue(true);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import laravel from 'laravel-vite-plugin';
3 |
4 | export default defineConfig({
5 | plugins: [
6 | laravel({
7 | input: ['resources/css/app.css', 'resources/js/app.js'],
8 | refresh: true,
9 | }),
10 | ],
11 | });
12 |
--------------------------------------------------------------------------------