Compare commits

..
Author SHA1 Message Date
世界 492934f7f2 documentation: Bump version 2024-12-15 22:51:19 +08:00
世界 bb422ea4c6 release: Add publish testflight 2024-12-15 22:51:19 +08:00
世界 2f24a64def Fix DNS match log 2024-12-15 21:39:54 +08:00
世界 8c52ef3d93 Fix domain strategy 2024-12-15 21:39:54 +08:00
世界 88cb947350 Fix time service 2024-12-15 21:39:54 +08:00
世界 5c63b4b152 Fix socks5 UDP implementation 2024-12-15 21:39:54 +08:00
世界 20c0dc8d69 clash-api: Fix missing endpoints 2024-12-15 21:39:53 +08:00
世界 5545417571 hysteria2: Add more masquerade options 2024-12-15 21:39:53 +08:00
世界 1d7cded8cc Improve timeouts 2024-12-15 21:39:53 +08:00
世界 77e7ebf981 Add UDP timeout route option 2024-12-15 21:39:41 +08:00
世界 0a32ae1fab Make GSO adaptive 2024-12-15 21:39:41 +08:00
世界 019373a9cd Fix tests 2024-12-15 21:39:41 +08:00
世界 c024184314 Fix lint 2024-12-15 21:39:41 +08:00
世界 935e0b24b8 refactor: WireGuard endpoint 2024-12-15 21:39:40 +08:00
世界 d41b117e57 refactor: connection manager 2024-12-15 21:39:40 +08:00
世界 dc91792837 documentation: Fix typo 2024-12-15 21:39:40 +08:00
世界 2b734e2021 Add override destination to route options 2024-12-15 21:39:39 +08:00
世界 c0531cb287 Add dns.cache_capacity 2024-12-15 21:39:39 +08:00
世界 bb39ed13dd Refactor multi networks strategy 2024-12-15 21:39:39 +08:00
世界 8b44d6bf58 documentation: Remove unused titles 2024-12-15 21:39:38 +08:00
世界 2e0b5c85f4 Add multi network dialing 2024-12-15 21:39:38 +08:00
世界 e329dfc158 documentation: Merge route options to route actions 2024-12-15 21:39:38 +08:00
世界 9d25b72fe1 Add network_[type/is_expensive/is_constrained] rule items 2024-12-15 21:39:37 +08:00
世界 2516644333 Merge route options to route actions 2024-12-15 21:39:37 +08:00
世界 a6e97c7fb7 refactor: Platform Interfaces 2024-12-15 21:39:37 +08:00
世界 29ebcd0e07 refactor: Extract services form router 2024-12-15 21:39:36 +08:00
世界 6bb7c3b4ec refactor: Modular network manager 2024-12-15 21:39:36 +08:00
世界 370a7c9246 refactor: Modular inbound/outbound manager 2024-12-15 21:38:50 +08:00
世界 1504895d13 documentation: Add rule action 2024-12-15 21:38:50 +08:00
世界 b4cf954fab documentation: Update the scheduled removal time of deprecated features 2024-12-15 21:38:50 +08:00
世界 1a56e1c8b7 documentation: Remove outdated icons 2024-12-15 21:38:49 +08:00
世界 91c8197107 Migrate bad options to library 2024-12-15 21:38:49 +08:00
世界 9ceb114117 Implement udp connect 2024-12-15 21:38:49 +08:00
世界 2491bded30 Implement new deprecated warnings 2024-12-15 21:38:49 +08:00
世界 039f9db370 Improve rule actions 2024-12-15 21:38:48 +08:00
世界 72807f291d Remove unused reject methods 2024-12-15 21:38:48 +08:00
世界 39f19ef62f refactor: Modular inbounds/outbounds 2024-12-15 21:38:47 +08:00
世界 2cd19a0211 Implement dns-hijack 2024-12-15 21:38:47 +08:00
世界 a6b3fc5b69 Implement resolve(server) 2024-12-15 21:38:47 +08:00
世界 8434e2c72f Implement TCP and ICMP rejects 2024-12-15 21:38:46 +08:00
世界 9e0b677938 Crazy sekai overturns the small pond 2024-12-15 21:38:46 +08:00
世界 6cc5fbeb55 Bump version 2024-12-15 21:38:11 +08:00
7 changed files with 92 additions and 60 deletions
+4
View File
@@ -491,6 +491,10 @@ jobs:
-authenticationKeyPath $ASC_KEY_PATH \
-authenticationKeyID $ASC_KEY_ID \
-authenticationKeyIssuerID $ASC_KEY_ISSUER_ID
- name: Publish to TestFlight
if: matrix.if && matrix.name != 'macOS-standalone' && github.event_name == 'workflow_dispatch'
run: |-
go run -v ./cmd/internal/app_store_connect publish_testflight ${{ matrix.platform }}
- name: Build image
if: matrix.if && matrix.name == 'macOS-standalone' && github.event_name == 'workflow_dispatch'
run: |-
+84 -54
View File
@@ -54,12 +54,12 @@ const (
groupID = "5c5f3b78-b7a0-40c0-bcad-e6ef87bbefda"
)
func createClient() *Client {
func createClient(expireDuration time.Duration) *Client {
privateKey, err := os.ReadFile(os.Getenv("ASC_KEY_PATH"))
if err != nil {
log.Fatal(err)
}
tokenConfig, err := asc.NewTokenConfig(os.Getenv("ASC_KEY_ID"), os.Getenv("ASC_KEY_ISSUER_ID"), time.Minute, privateKey)
tokenConfig, err := asc.NewTokenConfig(os.Getenv("ASC_KEY_ID"), os.Getenv("ASC_KEY_ISSUER_ID"), expireDuration, privateKey)
if err != nil {
log.Fatal(err)
}
@@ -67,7 +67,7 @@ func createClient() *Client {
}
func fetchMacOSVersion(ctx context.Context) error {
client := createClient()
client := createClient(time.Minute)
versions, _, err := client.Apps.ListAppStoreVersionsForApp(ctx, appID, &asc.ListAppStoreVersionsQuery{
FilterPlatform: []string{"MAC_OS"},
})
@@ -105,71 +105,101 @@ func publishTestflight(ctx context.Context) error {
return err
}
tag := tagVersion.VersionString()
client := createClient()
client := createClient(10 * time.Minute)
log.Info(tag, " list build IDs")
buildIDsResponse, _, err := client.TestFlight.ListBuildIDsForBetaGroup(ctx, groupID, nil)
if err != nil {
return err
}
buildIDS := common.Map(buildIDsResponse.Data, func(it asc.RelationshipData) string {
buildIDs := common.Map(buildIDsResponse.Data, func(it asc.RelationshipData) string {
return it.ID
})
for _, platform := range []asc.Platform{
asc.PlatformIOS,
asc.PlatformMACOS,
asc.PlatformTVOS,
} {
var platforms []asc.Platform
if len(os.Args) == 3 {
switch os.Args[2] {
case "ios":
platforms = []asc.Platform{asc.PlatformIOS}
case "macos":
platforms = []asc.Platform{asc.PlatformMACOS}
case "tvos":
platforms = []asc.Platform{asc.PlatformTVOS}
default:
return E.New("unknown platform: ", os.Args[2])
}
} else {
platforms = []asc.Platform{
asc.PlatformIOS,
asc.PlatformMACOS,
asc.PlatformTVOS,
}
}
for _, platform := range platforms {
log.Info(string(platform), " list builds")
builds, _, err := client.Builds.ListBuilds(ctx, &asc.ListBuildsQuery{
FilterApp: []string{appID},
FilterPreReleaseVersionPlatform: []string{string(platform)},
})
if err != nil {
return err
}
log.Info(string(platform), " ", tag, " list localizations")
localizations, _, err := client.TestFlight.ListBetaBuildLocalizationsForBuild(ctx, builds.Data[0].ID, nil)
if err != nil {
return err
}
localization := common.Find(localizations.Data, func(it asc.BetaBuildLocalization) bool {
return *it.Attributes.Locale == "en-US"
})
if localization.ID == "" {
log.Fatal(string(platform), " ", tag, " no en-US localization found")
}
if localization.Attributes == nil || localization.Attributes.WhatsNew == nil || *localization.Attributes.WhatsNew == "" {
log.Info(string(platform), " ", tag, " update localization")
_, _, err = client.TestFlight.UpdateBetaBuildLocalization(ctx, localization.ID, common.Ptr(
F.ToString("sing-box ", tag),
))
for {
builds, _, err := client.Builds.ListBuilds(ctx, &asc.ListBuildsQuery{
FilterApp: []string{appID},
FilterPreReleaseVersionPlatform: []string{string(platform)},
})
if err != nil {
return err
}
}
if !common.Contains(buildIDS, builds.Data[0].ID) {
build := builds.Data[0]
if common.Contains(buildIDs, build.ID) || time.Since(build.Attributes.UploadedDate.Time) > 5*time.Minute {
log.Info(string(platform), " ", tag, " waiting for process")
time.Sleep(15 * time.Second)
continue
}
if *build.Attributes.ProcessingState != "VALID" {
log.Info(string(platform), " ", tag, " waiting for process: ", *build.Attributes.ProcessingState)
time.Sleep(15 * time.Second)
continue
}
log.Info(string(platform), " ", tag, " list localizations")
localizations, _, err := client.TestFlight.ListBetaBuildLocalizationsForBuild(ctx, build.ID, nil)
if err != nil {
return err
}
localization := common.Find(localizations.Data, func(it asc.BetaBuildLocalization) bool {
return *it.Attributes.Locale == "en-US"
})
if localization.ID == "" {
log.Fatal(string(platform), " ", tag, " no en-US localization found")
}
if localization.Attributes == nil || localization.Attributes.WhatsNew == nil || *localization.Attributes.WhatsNew == "" {
log.Info(string(platform), " ", tag, " update localization")
_, _, err = client.TestFlight.UpdateBetaBuildLocalization(ctx, localization.ID, common.Ptr(
F.ToString("sing-box ", tag),
))
if err != nil {
return err
}
}
log.Info(string(platform), " ", tag, " publish")
_, err = client.TestFlight.AddBuildsToBetaGroup(ctx, groupID, []string{builds.Data[0].ID})
response, err := client.TestFlight.AddBuildsToBetaGroup(ctx, groupID, []string{build.ID})
if response != nil && response.StatusCode == http.StatusUnprocessableEntity {
log.Info("waiting for process")
time.Sleep(15 * time.Second)
continue
} else if err != nil {
return err
}
log.Info(string(platform), " ", tag, " list submissions")
betaSubmissions, _, err := client.TestFlight.ListBetaAppReviewSubmissions(ctx, &asc.ListBetaAppReviewSubmissionsQuery{
FilterBuild: []string{build.ID},
})
if err != nil {
return err
}
}
log.Info(string(platform), " ", tag, " list submissions")
betaSubmissions, _, err := client.TestFlight.ListBetaAppReviewSubmissions(ctx, &asc.ListBetaAppReviewSubmissionsQuery{
FilterBuild: []string{builds.Data[0].ID},
})
if err != nil {
return err
}
if len(betaSubmissions.Data) == 0 {
log.Info(string(platform), " ", tag, " create submission")
_, _, err = client.TestFlight.CreateBetaAppReviewSubmission(ctx, builds.Data[0].ID)
if err != nil {
return err
if len(betaSubmissions.Data) == 0 {
log.Info(string(platform), " ", tag, " create submission")
_, _, err = client.TestFlight.CreateBetaAppReviewSubmission(ctx, build.ID)
if err != nil {
return err
}
}
continue
break
}
}
return nil
}
@@ -187,7 +217,7 @@ func cancelAppStore(ctx context.Context, platform string) error {
if err != nil {
return err
}
client := createClient()
client := createClient(time.Minute)
log.Info(platform, " list versions")
versions, _, err := client.Apps.ListAppStoreVersionsForApp(ctx, appID, &asc.ListAppStoreVersionsQuery{
FilterPlatform: []string{string(platform)},
@@ -222,7 +252,7 @@ func prepareAppStore(ctx context.Context) error {
if err != nil {
return err
}
client := createClient()
client := createClient(time.Minute)
for _, platform := range []asc.Platform{
asc.PlatformIOS,
asc.PlatformMACOS,
@@ -364,7 +394,7 @@ func publishAppStore(ctx context.Context) error {
if err != nil {
return err
}
client := createClient()
client := createClient(time.Minute)
for _, platform := range []asc.Platform{
asc.PlatformIOS,
asc.PlatformMACOS,
-3
View File
@@ -300,9 +300,6 @@ func (d *DefaultDialer) ListenSerialInterfacePacket(ctx context.Context, destina
if fallbackDelay == 0 {
fallbackDelay = d.networkFallbackDelay
}
if !d.networkManager.AutoDetectInterface() {
return nil, E.New("`route.auto_detect_interface` is require by `network_strategy`")
}
network := N.NetworkUDP
if destination.IsIPv4() && !destination.Addr.IsUnspecified() {
network += "4"
+1 -1
View File
@@ -2,7 +2,7 @@
icon: material/alert-decagram
---
#### 1.11.0-beta.10
#### 1.11.0-beta.11
* Fixes and improvements
+1
View File
@@ -158,6 +158,7 @@ func (r *Router) Exchange(ctx context.Context, message *mDNS.Msg) (*mDNS.Msg, er
rule adapter.DNSRule
ruleIndex int
)
ruleIndex = -1
for {
dnsCtx := adapter.OverrideContext(ctx)
var addressLimit bool