Skip to content

Commit

Permalink
Add UNIX socket notifications for unknown users to VLESS (#3)
Browse files Browse the repository at this point in the history
* Add UNIX socket notifications for unknown users to VLESS

* Add UNIX socket notifications for unknown users to VLESS

* Add UNIX socket notifications for unknown users to VLESS
  • Loading branch information
leninalive authored Oct 11, 2024
1 parent 1ca5c5e commit 5e93984
Show file tree
Hide file tree
Showing 79 changed files with 452 additions and 102 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/xray-core
images: ghcr.io/${{ github.repository_owner }}/amnezia-xray-core
flavor: latest=true
tags: |
type=ref,event=branch
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Project X

[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).
[Project X](https://github.com/XTLS) originates from XTLS protocol, providing a set of network tools such as [Xray-core](https://github.com/amnezia-vpn/amnezia-xray-core) and [REALITY](https://github.com/XTLS/REALITY).

[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).
[README](https://github.com/amnezia-vpn/amnezia-xray-core#readme) is open, so feel free to submit your project [here](https://github.com/amnezia-vpn/amnezia-xray-core/pulls).

## License

[Mozilla Public License Version 2.0](https://github.com/XTLS/Xray-core/blob/main/LICENSE)
[Mozilla Public License Version 2.0](https://github.com/amnezia-vpn/amnezia-xray-core/blob/main/LICENSE)

## Documentation

Expand Down Expand Up @@ -116,12 +116,12 @@

## Contributing

[Code of Conduct](https://github.com/XTLS/Xray-core/blob/main/CODE_OF_CONDUCT.md)
[Code of Conduct](https://github.com/amnezia-vpn/amnezia-xray-core/blob/main/CODE_OF_CONDUCT.md)

## Credits

- [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).
- 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).
- [Xray-core v1.0.0](https://github.com/amnezia-vpn/amnezia-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/amnezia-vpn/amnezia-xray-core/releases).
- For third-party projects used in [Xray-core](https://github.com/amnezia-vpn/amnezia-xray-core), check your local or [the latest go.mod](https://github.com/amnezia-vpn/amnezia-xray-core/blob/main/go.mod).

## Compilation

Expand Down
2 changes: 1 addition & 1 deletion app/commander/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.app.commander;
option csharp_namespace = "Xray.App.Commander";
option go_package = "github.com/xtls/xray-core/app/commander";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/app/commander";
option java_package = "com.xray.app.commander";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion app/dispatcher/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.app.dispatcher;
option csharp_namespace = "Xray.App.Dispatcher";
option go_package = "github.com/xtls/xray-core/app/dispatcher";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/app/dispatcher";
option java_package = "com.xray.app.dispatcher";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion app/dns/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.app.dns;
option csharp_namespace = "Xray.App.Dns";
option go_package = "github.com/xtls/xray-core/app/dns";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/app/dns";
option java_package = "com.xray.app.dns";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion app/dns/fakedns/fakedns.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.app.dns.fakedns;
option csharp_namespace = "Xray.App.Dns.Fakedns";
option go_package = "github.com/xtls/xray-core/app/dns/fakedns";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/app/dns/fakedns";
option java_package = "com.xray.app.dns.fakedns";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion app/log/command/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.app.log.command;
option csharp_namespace = "Xray.App.Log.Command";
option go_package = "github.com/xtls/xray-core/app/log/command";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/app/log/command";
option java_package = "com.xray.app.log.command";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion app/log/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.app.log;
option csharp_namespace = "Xray.App.Log";
option go_package = "github.com/xtls/xray-core/app/log";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/app/log";
option java_package = "com.xray.app.log";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion app/metrics/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.app.metrics;
option csharp_namespace = "Xray.App.Metrics";
option go_package = "github.com/xtls/xray-core/app/metrics";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/app/metrics";
option java_package = "com.xray.app.metrics";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion app/observatory/burst/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.core.app.observatory.burst;
option csharp_namespace = "Xray.App.Observatory.Burst";
option go_package = "github.com/xtls/xray-core/app/observatory/burst";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/app/observatory/burst";
option java_package = "com.xray.app.observatory.burst";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion app/observatory/command/command.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.core.app.observatory.command;
option csharp_namespace = "Xray.Core.App.Observatory.Command";
option go_package = "github.com/xtls/xray-core/app/observatory/command";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/app/observatory/command";
option java_package = "com.xray.core.app.observatory.command";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion app/observatory/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.core.app.observatory;
option csharp_namespace = "Xray.App.Observatory";
option go_package = "github.com/xtls/xray-core/app/observatory";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/app/observatory";
option java_package = "com.xray.app.observatory";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion app/policy/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.app.policy;
option csharp_namespace = "Xray.App.Policy";
option go_package = "github.com/xtls/xray-core/app/policy";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/app/policy";
option java_package = "com.xray.app.policy";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion app/proxyman/command/command.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.app.proxyman.command;
option csharp_namespace = "Xray.App.Proxyman.Command";
option go_package = "github.com/xtls/xray-core/app/proxyman/command";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/app/proxyman/command";
option java_package = "com.xray.app.proxyman.command";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion app/proxyman/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.app.proxyman;
option csharp_namespace = "Xray.App.Proxyman";
option go_package = "github.com/xtls/xray-core/app/proxyman";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/app/proxyman";
option java_package = "com.xray.app.proxyman";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion app/reverse/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.app.reverse;
option csharp_namespace = "Xray.Proxy.Reverse";
option go_package = "github.com/xtls/xray-core/app/reverse";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/app/reverse";
option java_package = "com.xray.proxy.reverse";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion app/router/command/command.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.app.router.command;
option csharp_namespace = "Xray.App.Router.Command";
option go_package = "github.com/xtls/xray-core/app/router/command";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/app/router/command";
option java_package = "com.xray.app.router.command";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion app/router/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.app.router;
option csharp_namespace = "Xray.App.Router";
option go_package = "github.com/xtls/xray-core/app/router";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/app/router";
option java_package = "com.xray.app.router";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion app/stats/command/command.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.app.stats.command;
option csharp_namespace = "Xray.App.Stats.Command";
option go_package = "github.com/xtls/xray-core/app/stats/command";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/app/stats/command";
option java_package = "com.xray.app.stats.command";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion app/stats/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.app.stats;
option csharp_namespace = "Xray.App.Stats";
option go_package = "github.com/xtls/xray-core/app/stats";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/app/stats";
option java_package = "com.xray.app.stats";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion common/log/log.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.common.log;
option csharp_namespace = "Xray.Common.Log";
option go_package = "github.com/xtls/xray-core/common/log";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/common/log";
option java_package = "com.xray.common.log";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion common/net/address.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.common.net;
option csharp_namespace = "Xray.Common.Net";
option go_package = "github.com/xtls/xray-core/common/net";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/common/net";
option java_package = "com.xray.common.net";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion common/net/destination.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.common.net;
option csharp_namespace = "Xray.Common.Net";
option go_package = "github.com/xtls/xray-core/common/net";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/common/net";
option java_package = "com.xray.common.net";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion common/net/network.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.common.net;
option csharp_namespace = "Xray.Common.Net";
option go_package = "github.com/xtls/xray-core/common/net";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/common/net";
option java_package = "com.xray.common.net";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion common/net/port.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.common.net;
option csharp_namespace = "Xray.Common.Net";
option go_package = "github.com/xtls/xray-core/common/net";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/common/net";
option java_package = "com.xray.common.net";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion common/protocol/headers.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.common.protocol;
option csharp_namespace = "Xray.Common.Protocol";
option go_package = "github.com/xtls/xray-core/common/protocol";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/common/protocol";
option java_package = "com.xray.common.protocol";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion common/protocol/server_spec.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.common.protocol;
option csharp_namespace = "Xray.Common.Protocol";
option go_package = "github.com/xtls/xray-core/common/protocol";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/common/protocol";
option java_package = "com.xray.common.protocol";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion common/protocol/user.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.common.protocol;
option csharp_namespace = "Xray.Common.Protocol";
option go_package = "github.com/xtls/xray-core/common/protocol";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/common/protocol";
option java_package = "com.xray.common.protocol";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion common/serial/typed_message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.common.serial;
option csharp_namespace = "Xray.Common.Serial";
option go_package = "github.com/xtls/xray-core/common/serial";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/common/serial";
option java_package = "com.xray.common.serial";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion core/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.core;
option csharp_namespace = "Xray.Core";
option go_package = "github.com/xtls/xray-core/core";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/core";
option java_package = "com.xray.core";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/amnezia-vpn/amnezia-xray-core

go 1.22.3
go 1.23.1

require (
github.com/OmarTariq612/goech v0.0.0-20240405204721-8e2e1dafd3a0
Expand Down
10 changes: 6 additions & 4 deletions infra/conf/vless.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ type VLessInboundFallback struct {
}

type VLessInboundConfig struct {
Clients []json.RawMessage `json:"clients"`
Decryption string `json:"decryption"`
Fallback *VLessInboundFallback `json:"fallback"`
Fallbacks []*VLessInboundFallback `json:"fallbacks"`
Clients []json.RawMessage `json:"clients"`
Decryption string `json:"decryption"`
Fallback *VLessInboundFallback `json:"fallback"`
Fallbacks []*VLessInboundFallback `json:"fallbacks"`
Notifications string `json:"notifications"`
}

// Build implements Buildable
Expand Down Expand Up @@ -72,6 +73,7 @@ func (c *VLessInboundConfig) Build() (proto.Message, error) {
return nil, newError(`VLESS settings: please add/set "decryption":"none" to every settings`)
}
config.Decryption = c.Decryption
config.Notifications = c.Notifications

if c.Fallback != nil {
return nil, newError(`VLESS settings: please use "fallbacks":[{}] instead of "fallback":{}`)
Expand Down
2 changes: 1 addition & 1 deletion proxy/blackhole/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.proxy.blackhole;
option csharp_namespace = "Xray.Proxy.Blackhole";
option go_package = "github.com/xtls/xray-core/proxy/blackhole";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/proxy/blackhole";
option java_package = "com.xray.proxy.blackhole";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion proxy/dns/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.proxy.dns;
option csharp_namespace = "Xray.Proxy.Dns";
option go_package = "github.com/xtls/xray-core/proxy/dns";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/proxy/dns";
option java_package = "com.xray.proxy.dns";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion proxy/dokodemo/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.proxy.dokodemo;
option csharp_namespace = "Xray.Proxy.Dokodemo";
option go_package = "github.com/xtls/xray-core/proxy/dokodemo";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/proxy/dokodemo";
option java_package = "com.xray.proxy.dokodemo";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion proxy/freedom/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.proxy.freedom;
option csharp_namespace = "Xray.Proxy.Freedom";
option go_package = "github.com/xtls/xray-core/proxy/freedom";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/proxy/freedom";
option java_package = "com.xray.proxy.freedom";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion proxy/http/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.proxy.http;
option csharp_namespace = "Xray.Proxy.Http";
option go_package = "github.com/xtls/xray-core/proxy/http";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/proxy/http";
option java_package = "com.xray.proxy.http";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion proxy/loopback/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.proxy.loopback;
option csharp_namespace = "Xray.Proxy.Loopback";
option go_package = "github.com/xtls/xray-core/proxy/loopback";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/proxy/loopback";
option java_package = "com.xray.proxy.loopback";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion proxy/shadowsocks/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.proxy.shadowsocks;
option csharp_namespace = "Xray.Proxy.Shadowsocks";
option go_package = "github.com/xtls/xray-core/proxy/shadowsocks";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/proxy/shadowsocks";
option java_package = "com.xray.proxy.shadowsocks";
option java_multiple_files = true;

Expand Down
2 changes: 1 addition & 1 deletion proxy/shadowsocks_2022/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package xray.proxy.shadowsocks_2022;
option csharp_namespace = "Xray.Proxy.Shadowsocks2022";
option go_package = "github.com/xtls/xray-core/proxy/shadowsocks_2022";
option go_package = "github.com/amnezia-vpn/amnezia-xray-core/proxy/shadowsocks_2022";
option java_package = "com.xray.proxy.shadowsocks_2022";
option java_multiple_files = true;

Expand Down
Loading

0 comments on commit 5e93984

Please sign in to comment.