Compare commits

...

3 Commits

Author SHA1 Message Date
wyx2685
7715ea038d Update release.yml 2023-11-18 20:01:16 +08:00
wyx2685
607264af87 Update release.yml 2023-11-18 19:53:57 +08:00
wyx2685
5998358a5d 细化面板REALITY配置 2023-11-18 11:59:58 +09:00
3 changed files with 14 additions and 6 deletions

View File

@@ -103,7 +103,7 @@ jobs:
run: |
export _NAME=$(jq ".[\"$GOOS-$GOARCH$GOARM$GOMIPS\"].friendlyName" -r < .github/build/friendly-filenames.json)
echo "GOOS: $GOOS, GOARCH: $GOARCH, GOARM: $GOARM, GOMIPS: $GOMIPS, RELEASE_NAME: $_NAME"
echo "::set-output name=ASSET_NAME::$_NAME"
echo "ASSET_NAME=$_NAME" >> $GITHUB_OUTPUT
echo "ASSET_NAME=$_NAME" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v3
@@ -124,13 +124,13 @@ jobs:
run: |
echo "version: $version"
mkdir -p build_assets
go build -v -o build_assets/V2bX -tags "sing xray with_reality_server with_quic" -trimpath -ldflags "-X 'github.com/InazumaV/V2bX/cmd.version=$version' -s -w -buildid="
go build -v -o build_assets/V2bX -tags "sing xray with_reality_server with_quic with_grpc with_utls with_wireguard with_acme" -trimpath -ldflags "-X 'github.com/InazumaV/V2bX/cmd.version=$version' -s -w -buildid="
- name: Build Mips softfloat V2bX
if: matrix.goarch == 'mips' || matrix.goarch == 'mipsle'
run: |
echo "version: $version"
GOMIPS=softfloat go build -v -o build_assets/V2bX_softfloat -tags "sing xray with_reality_server with_quic" -trimpath -ldflags "-X 'github.com/InazumaV/V2bX/cmd.version=$version' -s -w -buildid="
GOMIPS=softfloat go build -v -o build_assets/V2bX_softfloat -tags "sing xray with_reality_server with_quic with_grpc with_utls with_wireguard with_acme" -trimpath -ldflags "-X 'github.com/InazumaV/V2bX/cmd.version=$version' -s -w -buildid="
- name: Rename Windows V2bX
if: matrix.goos == 'windows'
run: |

View File

@@ -74,6 +74,7 @@ type VAllssNode struct {
type TlsSettings struct {
ServerName string `json:"server_name"`
Dest string `json:"dest"`
ServerPort string `json:"server_port"`
ShortId string `json:"short_id"`
PrivateKey string `json:"private_key"`

View File

@@ -61,7 +61,14 @@ func getInboundOptions(tag string, info *panel.NodeInfo, c *conf.Options) (optio
tls.Enabled = true
v := info.VAllss
tls.ServerName = v.TlsSettings.ServerName
dest, _ := strconv.Atoi(v.TlsSettings.ServerPort)
port, _ := strconv.Atoi(v.TlsSettings.ServerPort)
var dest string
if v.TlsSettings.Dest != "" {
dest = v.TlsSettings.Dest
} else {
dest = tls.ServerName
}
mtd, _ := time.ParseDuration(v.RealityConfig.MaxTimeDiff)
tls.Reality = &option.InboundRealityOptions{
Enabled: true,
@@ -69,8 +76,8 @@ func getInboundOptions(tag string, info *panel.NodeInfo, c *conf.Options) (optio
PrivateKey: v.TlsSettings.PrivateKey,
Handshake: option.InboundRealityHandshakeOptions{
ServerOptions: option.ServerOptions{
Server: tls.ServerName,
ServerPort: uint16(dest),
Server: dest,
ServerPort: uint16(port),
},
},
MaxTimeDifference: option.Duration(mtd),